2020-03-28 15:44:16 +00:00
|
|
|
|
|
|
|
name: CI
|
|
|
|
|
|
|
|
# Run tests on pull requests and when changes are directly
|
|
|
|
# commited to master.
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
2021-01-19 21:49:19 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
# run the CI also on PRs that are based on branches starting with pr/...
|
|
|
|
- 'pr/**'
|
2020-10-25 14:19:43 +00:00
|
|
|
schedule:
|
|
|
|
- cron: 1 1 * * *
|
2020-03-28 15:44:16 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Run static/code-quality checks
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-03 17:47:37 +00:00
|
|
|
- uses: actions/setup-go@v2
|
2020-03-28 15:44:16 +00:00
|
|
|
with:
|
|
|
|
go-version: 1.14
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install revive
|
|
|
|
run: go get github.com/mgechev/revive
|
|
|
|
- name: Run checks
|
|
|
|
run: make check
|
|
|
|
|
|
|
|
# Run the test suite in a container per-ceph-codename
|
|
|
|
test-suite:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
ceph_version:
|
|
|
|
- "nautilus"
|
|
|
|
- "octopus"
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run test container
|
2020-04-17 15:29:53 +00:00
|
|
|
run: make test-container "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
|
2021-01-18 22:29:06 +00:00
|
|
|
- name: Run ptrguard test container
|
|
|
|
run: make test-container "USE_PTRGUARD=true" "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
|
2020-04-17 15:29:53 +00:00
|
|
|
- name: Archive coverage results
|
2020-05-27 20:29:26 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-04-17 15:29:53 +00:00
|
|
|
with:
|
|
|
|
name: "go-ceph-coverage-${{ matrix.ceph_version }}"
|
|
|
|
path: "_results/coverage/go-ceph.html"
|
2020-05-27 20:29:26 +00:00
|
|
|
- name: Archive implements results
|
|
|
|
if: "matrix.ceph_version == 'octopus'"
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: "go-ceph-implements-${{ matrix.ceph_version }}"
|
|
|
|
path: "_results/implements.*"
|