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:
|
2022-04-12 11:33:28 +00:00
|
|
|
fail-fast: false
|
2020-03-28 15:44:16 +00:00
|
|
|
matrix:
|
|
|
|
ceph_version:
|
|
|
|
- "nautilus"
|
|
|
|
- "octopus"
|
2021-03-17 14:56:08 +00:00
|
|
|
- "pacific"
|
2022-02-28 18:16:24 +00:00
|
|
|
- "quincy"
|
2022-07-19 10:08:35 +00:00
|
|
|
- "pre-pacific"
|
|
|
|
- "pre-quincy"
|
|
|
|
- "main"
|
2020-03-28 15:44:16 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-08-23 13:38:45 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: make test-containers-test "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
|
|
|
|
- name: Clean up test containers
|
|
|
|
run: make test-containers-clean "CEPH_VERSION=${{ matrix.ceph_version }}"
|
2022-07-25 17:18:24 +00:00
|
|
|
- name: Archive test results
|
|
|
|
uses: actions/upload-artifact@v3
|
2020-04-17 15:29:53 +00:00
|
|
|
with:
|
2022-07-25 17:18:24 +00:00
|
|
|
name: "go-ceph-results-${{ matrix.ceph_version }}"
|
|
|
|
path: |
|
|
|
|
_results/
|
|
|
|
retention-days: 30
|
2021-09-21 20:15:06 +00:00
|
|
|
- name: Check API Versions and Aging
|
|
|
|
run: |
|
|
|
|
if [ -f _results/implements.json ]; then
|
|
|
|
./contrib/apiage.py
|
|
|
|
else
|
|
|
|
echo "Skipping apiage check"
|
|
|
|
fi
|