Merge pull request #429 from factly/add-token-info-endpoint #363
This file contains 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: Server CI | |
on: | |
pull_request: | |
branches: [develop, master] | |
paths: | |
- server/** | |
push: | |
branches: [develop, master] | |
paths: | |
- server/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./server | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Go | |
uses: actions/setup-go@v2 | |
id: setup_go | |
with: | |
go-version: "1.18" | |
- name: Cache go-modules | |
uses: actions/cache@v1 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
- run: go mod download | |
working-directory: ${{env.working-directory}} | |
- run: go get github.com/golangci/golangci-lint/cmd/[email protected] | |
working-directory: ${{env.working-directory}} | |
- run: golangci-lint run ./... | |
working-directory: ${{env.working-directory}} | |
- run: go test ./test/... -coverpkg ./action/... -coverprofile=cov.out | |
working-directory: ${{env.working-directory}} | |
- name: Analyze with SonarCloud | |
uses: sonarsource/sonarcloud-github-action@master | |
with: | |
projectBaseDir: ./server | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |