From bb53801219e7d315923c818a308f8b396f937bd5 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 8 Jun 2020 21:35:25 +0200 Subject: [PATCH] Add workflow for GitHub Actions --- .github/workflows/main.yaml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..04fbd8b --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,41 @@ +# Github Actions workflow + + +name: CI + +on: + # Run the jobs for all pushes and pull requests + push: + branches: + - "*" + pull_request: + branches: + - "*" + # And once per month to ensure the project continues to work + schedule: + - cron: '0 0 1 * *' + +jobs: + test-docker: + runs-on: ubuntu-latest + container: ${{ matrix.container }} + strategy: + matrix: + container: + - debian:stable + - debian:testing + - debian:sid + steps: + - uses: actions/checkout@v2 + - name: Setup dependencies + run: | + apt-get update + apt-get install --no-install-recommends --yes golang golang-golang-x-tools build-essential clang git ca-certificates + - name: Run CI + run: | + # Run as user nobody so CAP_DAC_OVERRIDE is dropped and the tests + # can chmod a file 0000 to force "permission denied" errors. + export HOME=/tmp # writable by nobody + chown -R nobody . + # Empty TEST_* as -fsanitize doesn't work in a Docker container + runuser -p -u nobody -- ./ci/run TEST_CFLAGS= TEST_LDFLAGS= -- 2.43.2