From: Simon Ruderich Date: Mon, 8 Jun 2020 19:35:25 +0000 (+0200) Subject: Add workflow for GitHub Actions X-Git-Tag: 0.2~4 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=bb53801219e7d315923c818a308f8b396f937bd5;p=nsscash%2Fnsscash.git Add workflow for GitHub Actions --- 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=