52 feat add authentication #41
Workflow file for this run
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: Golang CI | |
on: | |
push: | |
branches: ["main"] | |
paths: ["backend/**"] | |
pull_request: | |
branches: ["main", "dev"] | |
paths: ["backend/**"] | |
permissions: | |
contents: read | |
defaults: | |
run: | |
working-directory: ./backend | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22.x" | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
version: 3.x | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Format Check | |
run: task check-format | |
- name: Build | |
run: task build-web | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: v1.54 | |
working-directory: backend | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22.x" | |
- name: Install dependencies | |
run: | | |
go install gotest.tools/gotestsum@latest | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
version: 3.x | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Test with the Go CLI | |
run: task test-all | |
check-vuln: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22.x" | |
- name: Install Task | |
uses: arduino/setup-task@v1 | |
with: | |
version: 3.x | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: | | |
go install golang.org/x/vuln/cmd/govulncheck@latest | |
- name: Check for vulnerabilities | |
run: task check-vuln |