-
Notifications
You must be signed in to change notification settings - Fork 108
39 lines (31 loc) · 1.04 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
- 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@v3
with:
path: cover.html
# Rebuild webmail frontend code, should be the same as committed.
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: 'touch webmail/*.ts && make frontend'
# 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