Skip to content

Commit

Permalink
add shopify test
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac committed Sep 7, 2024
2 parents 2907e8a + 1d68c4a commit 2a7e049
Show file tree
Hide file tree
Showing 12 changed files with 565 additions and 225 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
test-go:
name: Run Go lint and unit tests
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
pull-requests: write
# Required: allow read access to the content for analysis.
Expand All @@ -26,14 +26,6 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: |
go get -t -v ./...
Expand All @@ -47,13 +39,11 @@ jobs:
cd ./example/hasura
docker-compose up -d
- name: Lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: latest
only-new-issues: true
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true
args: --timeout=120s
- name: Run Go unit tests for example/subscription
run: |
Expand All @@ -63,13 +53,13 @@ jobs:
- name: Run Go unit tests
run: go test -v -race -timeout 3m -coverprofile=coverage.out ./...
- name: Go coverage format
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.repository == 'hasura/go-graphql-client' }}
run: |
go get github.com/boumenot/gocover-cobertura
go install github.com/boumenot/gocover-cobertura
gocover-cobertura < coverage.out > coverage.xml
- name: Code Coverage Summary Report
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.repository == 'hasura/go-graphql-client' }}
uses: irongut/[email protected]
with:
filename: coverage.xml
Expand All @@ -83,7 +73,7 @@ jobs:
thresholds: "60 80"
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' && github.repository == 'hasura/go-graphql-client' }}
with:
path: code-coverage-results.md
- name: Dump docker logs on failure
Expand Down
Loading

0 comments on commit 2a7e049

Please sign in to comment.