Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ctran88 committed Jan 22, 2025
1 parent 06adc6c commit b49b286
Showing 1 changed file with 42 additions and 38 deletions.
80 changes: 42 additions & 38 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
workflow_call:
workflow_dispatch:
pull_request:
push:
branches:
- PSG-5780-sdk-test-go

env:
PASSAGE_APP_ID: ${{ secrets.PASSAGE_APP_ID }}
Expand All @@ -12,44 +15,44 @@ env:
PASSAGE_AUTH_TOKEN: ${{ secrets.PASSAGE_AUTH_TOKEN }}

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Format
run: |
if [[ $(gofmt -s -d .) ]]; then
echo "Run 'gofmt -s -w .' to format code."
exit 1
fi
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Test
run: go test ./...
- name: Test with race detector
run: go test -race -run TestAppJWKSCacheWriteConcurrency
# lint:
# name: Lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v5
# with:
# go-version: '1.21'
# - name: Lint
# uses: golangci/golangci-lint-action@v6
# with:
# version: v1.60
# format:
# name: Format
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v5
# with:
# go-version: '1.21'
# - name: Format
# run: |
# if [[ $(gofmt -s -d .) ]]; then
# echo "Run 'gofmt -s -w .' to format code."
# exit 1
# fi
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-go@v5
# with:
# go-version: '1.21'
# - name: Test
# run: go test ./...
# - name: Test with race detector
# run: go test -race -run TestAppJWKSCacheWriteConcurrency
test-e2e:
name: Test E2E
runs-on: ubuntu-latest
Expand All @@ -58,6 +61,7 @@ jobs:
with:
require: write
id: check_permission
- uses: actions/checkout@v4
- name: Get SDK version
id: get_sdk_version
if: ${{ steps.check_permission.outputs.require-result == 'true' }}
Expand Down

0 comments on commit b49b286

Please sign in to comment.