Skip to content

Commit c237277

Browse files
committed
CI: Switch to Makefile for running unit tests
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent 641d7c1 commit c237277

File tree

3 files changed

+7
-46
lines changed

3 files changed

+7
-46
lines changed

.github/workflows/unit.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
on: [push, pull_request]
21
name: Unit Testing
2+
on:
3+
- push
4+
- pull_request
35
permissions:
46
contents: read
5-
67
jobs:
78
test:
89
permissions:
@@ -15,35 +16,29 @@ jobs:
1516
go-version:
1617
- "1.23.0"
1718
- "1"
18-
1919
steps:
20+
- name: Checkout Gophercloud
21+
uses: actions/checkout@v4
2022
- name: Setup Go ${{ matrix.go-version }}
2123
uses: actions/setup-go@v5
2224
with:
2325
go-version: ${{ matrix.go-version }}
24-
25-
- uses: actions/checkout@v4
26-
2726
- name: Setup environment
2827
run: |
2928
# Changing into a different directory to avoid polluting go.sum with "go get"
3029
cd "$(mktemp -d)"
3130
go mod init unit_tests
32-
3331
go install github.com/wadey/gocovmerge@master
34-
3532
- name: Run unit tests
3633
run: |
37-
./script/coverage
38-
./script/unittest
39-
34+
make unit
35+
make coverage
4036
- name: Check coverage
4137
uses: coverallsapp/github-action@v2
4238
with:
4339
file: cover.out
4440
flag-name: Go-${{ matrix.go-version }}
4541
parallel: true
46-
4742
finish:
4843
permissions:
4944
checks: write # for coverallsapp/github-action to create a new check based on the results

script/coverage

Lines changed: 0 additions & 24 deletions
This file was deleted.

script/unittest

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)