Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

fix push action (#62) #103

fix push action (#62)

fix push action (#62) #103

Workflow file for this run

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