This repository was archived by the owner on Nov 27, 2024. It is now read-only.
ci image push (#74) #114
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: # yamllint disable-line rule:truthy | |
pull_request: | |
paths: | |
- "server/**" | |
push: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
unit: | |
name: Unit tests | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Run tests | |
# todo: set up code coverage? | |
run: make -C server test | |
lint-go: | |
name: Lint code | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Checkout Git Repository | |
uses: actions/checkout@v4 | |
- name: Determine golang-ci version | |
id: golangci_version | |
run: | | |
echo "version=$(go mod edit -json | jq '.Require | map(select(.Path == "github.com/golangci/golangci-lint"))[].Version')" >> $GITHUB_OUTPUT | |
- name: Lint with golang-ci | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
version: ${{ steps.golangci_version.version }} | |
working-directory: server |