Skip to content

Commit

Permalink
Merge pull request #1 from emmadevjr/develope
Browse files Browse the repository at this point in the history
Add unit test to  git hub actions
  • Loading branch information
Iajrdev committed May 24, 2024
2 parents 259fac9 + 949fa3a commit d8bbb2a
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: '1.22.2'
- name: Format
- name: Check Formatting
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
Expand All @@ -40,8 +40,8 @@ jobs:
exit 1
fi
test:
name: Test
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
needs: fmt
steps:
Expand All @@ -58,5 +58,26 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test -v .
- name: Run Unit Tests
run: go test -v ./... -run '.*_unit_test.go'

property-test:
name: Property Tests
runs-on: ubuntu-latest
needs: fmt
steps:
- name: Setting up Go
uses: actions/setup-go@v3
with:
go-version: '1.22.2'
- name: Check out code
uses: actions/checkout@v2
- name: Cache Go Modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Property Tests
run: go test -v ./... -run '.*_property_test.go'

0 comments on commit d8bbb2a

Please sign in to comment.