mox/.github/workflows/build-test.yml
Mechiel Lukkien 8fac9f862b
Some checks are pending
Build and test / build-test (oldstable) (push) Waiting to run
Build and test / build-test (stable) (push) Waiting to run
attempt to fix workflow again
sigh, this is why you don't you use cloud tools that you can't run locally...
2025-01-23 18:40:05 +01:00

39 lines
1.1 KiB
YAML

name: Build and test
on: [push, pull_request, workflow_dispatch]
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
max-parallel: 1 # cannot run tests concurrently, files are created
matrix:
go-version: ['stable', 'oldstable']
steps:
- uses: actions/checkout@v3
# Trigger rebuilding frontends, should be the same as committed.
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: 'touch */*.ts'
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- run: make build
# Need to run tests with a temp dir on same file system for os.Rename to succeed.
- run: 'mkdir -p tmp && TMPDIR=$PWD/tmp make test'
- uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.go-version }}
path: cover.html
# Format code, we check below if nothing changed.
- run: 'make fmt'
# Enforce the steps above didn't make any changes.
- run: git diff --exit-code