feat(auth): improve role management and directive handling #55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD | |
on: | |
pull_request: | |
branches: | |
- main | |
types: [ opened, synchronize, reopened ] | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23 | |
- name: Cache Go modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- uses: extractions/setup-just@v2 | |
name: Install just | |
- name: Install dependencies | |
run: | | |
go install github.com/vektra/mockery/v2@v2.49.1 | |
go install github.com/nikolaydubina/go-cover-treemap@latest | |
go mod download | |
- name: Generate code | |
run: go generate ./... | |
- name: Generate GraphQL code | |
run: just gen gql | |
- name: Run tests | |
run: just ci tests | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests |