]> ruderich.org/simon Gitweb - nsscash/nsscash.git/blob - .github/workflows/main.yaml
Add workflow for GitHub Actions
[nsscash/nsscash.git] / .github / workflows / main.yaml
1 # Github Actions workflow
2
3
4 name: CI
5
6 on:
7   # Run the jobs for all pushes and pull requests
8   push:
9     branches:
10       - "*"
11   pull_request:
12     branches:
13       - "*"
14   # And once per month to ensure the project continues to work
15   schedule:
16     - cron: '0 0 1 * *'
17
18 jobs:
19   test-docker:
20     runs-on: ubuntu-latest
21     container: ${{ matrix.container }}
22     strategy:
23       matrix:
24         container:
25           - debian:stable
26           - debian:testing
27           - debian:sid
28     steps:
29       - uses: actions/checkout@v2
30       - name: Setup dependencies
31         run: |
32           apt-get update
33           apt-get install --no-install-recommends --yes golang golang-golang-x-tools build-essential clang git ca-certificates
34       - name: Run CI
35         run: |
36           # Run as user nobody so CAP_DAC_OVERRIDE is dropped and the tests
37           # can chmod a file 0000 to force "permission denied" errors.
38           export HOME=/tmp # writable by nobody
39           chown -R nobody .
40           # Empty TEST_* as -fsanitize doesn't work in a Docker container
41           runuser -p -u nobody -- ./ci/run TEST_CFLAGS= TEST_LDFLAGS=