Skip to content

Commit

Permalink
add sda-admin unit tests to the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjiangshu committed Sep 10, 2024
1 parent 44bea2c commit 8bac427
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:

- name: Get dependencies
run: |
cd sda-download
cd sda
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
Expand All @@ -104,3 +104,41 @@ jobs:
file: ./sda/coverage.txt
flags: unittests
fail_ci_if_error: false

test_sda_admin:
name: Test SDA Admin
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.22']
steps:

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: |
cd sda-admin
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Test
run: |
cd sda-admin
go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./sda-admin/coverage.txt
flags: unittests
fail_ci_if_error: false

0 comments on commit 8bac427

Please sign in to comment.