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 e5381d3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 40 deletions.
84 changes: 45 additions & 39 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,9 @@ jobs:
with:
require: write
id: check_permission
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Get SDK version
id: get_sdk_version
if: ${{ steps.check_permission.outputs.require-result == 'true' }}
Expand All @@ -68,7 +74,7 @@ jobs:
version=''
if [[ $go_mod_version -gt $manifest_version ]]; then
version=$go_mod_version
version="${go_mod_version}.0.0"
fi
echo "version=$version" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/passageidentity/passage-go/v2
module github.com/passageidentity/passage-go/v3

go 1.21

Expand Down

0 comments on commit e5381d3

Please sign in to comment.