mirror of
https://github.com/ceph/go-ceph
synced 2024-12-20 21:33:06 +00:00
359d4a4918
Signed-off-by: John Mulligan <jmulligan@redhat.com>
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
|
|
name: CI
|
|
|
|
# Run tests on pull requests and when changes are directly
|
|
# commited to master.
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
# run the CI also on PRs that are based on branches starting with pr/...
|
|
- 'pr/**'
|
|
schedule:
|
|
- cron: 1 1 * * *
|
|
|
|
jobs:
|
|
# Run static/code-quality checks
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: 1.19
|
|
- uses: actions/checkout@v3
|
|
- name: Install revive
|
|
run: go install github.com/mgechev/revive@latest
|
|
- name: Run checks
|
|
run: make check
|
|
|
|
# Run the test suite in a container per-ceph-codename
|
|
test-suite:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
ceph_version:
|
|
- "nautilus"
|
|
- "octopus"
|
|
- "pacific"
|
|
- "quincy"
|
|
- "reef"
|
|
- "pre-pacific"
|
|
- "pre-quincy"
|
|
- "pre-reef"
|
|
- "main"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- 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 }}"
|
|
- name: Archive test results
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: "go-ceph-results-${{ matrix.ceph_version }}"
|
|
path: |
|
|
_results/
|
|
retention-days: 30
|
|
- name: Check API Versions and Aging
|
|
run: |
|
|
if [ -f _results/implements.json ]; then
|
|
./contrib/apiage.py
|
|
else
|
|
echo "Skipping apiage check"
|
|
fi
|