go-ceph/.github/workflows/main.yml
John Mulligan b76c077b3c workflows: on octopus test runs archive the 'implements' output
Only octopus containers will have castxml available for now.
Conditionally grab the files generated by 'implements' and
make it available for later examination.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-06-05 11:35:03 -04:00

51 lines
1.3 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 ]
jobs:
# Run static/code-quality checks
check:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2-beta
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:
- "luminous"
- "mimic"
- "nautilus"
- "octopus"
steps:
- uses: actions/checkout@v2
- name: Run test container
run: make test-container "CEPH_VERSION=${{ matrix.ceph_version }}" "RESULTS_DIR=$PWD/_results"
- name: Archive coverage results
uses: actions/upload-artifact@v2
with:
name: "go-ceph-coverage-${{ matrix.ceph_version }}"
path: "_results/coverage/go-ceph.html"
- 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.*"