diff options
author | Jan Pazdziora <jpazdziora@redhat.com> | 2021-03-30 08:40:24 +0200 |
---|---|---|
committer | Jan Pazdziora <jpazdziora@redhat.com> | 2021-03-30 08:42:08 +0200 |
commit | 7d30a9433265402d5c8f9094fd9823cc3bd41167 (patch) | |
tree | 462adc1ab71fb965eb20270a5f6e9189823453fe | |
parent | 644d7434e7a7421f5d52343df6144f7947816902 (diff) | |
download | mod_authnz_pam-7d30a9433265402d5c8f9094fd9823cc3bd41167.tar.gz mod_authnz_pam-7d30a9433265402d5c8f9094fd9823cc3bd41167.tar.xz mod_authnz_pam-7d30a9433265402d5c8f9094fd9823cc3bd41167.zip |
Add CI testing on GitHub Actions.
-rw-r--r-- | .github/workflows/build-test.yaml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml new file mode 100644 index 0000000..140bf00 --- /dev/null +++ b/.github/workflows/build-test.yaml @@ -0,0 +1,27 @@ +name: Build and test mod_authnz_pam + +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '38 4 3,17 * *' + +jobs: + build: + name: Run tests in container + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + os: [ fedora-latest, centos-8, centos-7 ] + steps: + - uses: actions/checkout@v2 + - name: Set the right OS in the Dockerfile + run: sed -i "s#^FROM.*#FROM $( echo ${{ matrix.os }} | sed 's#^fedora-#registry.fedoraproject.org/fedora:#; s#^centos-#registry.centos.org/centos:#;' )#" tests/Dockerfile + - name: Build image + run: docker build -t mod_authnz_pam -f tests/Dockerfile . + - name: Run container + run: docker run --name mod_authnz_pam --rm -d mod_authnz_pam + - name: Run tests in the container + run: docker exec mod_authnz_pam tests/run.sh |