forked from cyclus/cyclus
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (65 loc) · 2.16 KB
/
code_coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Code Coverage
on:
# allows us to run workflows manually
workflow_dispatch:
pull_request:
paths-ignore:
- '.github/workflows/build_test.yml'
- '.github/workflows/publish_latest.yml'
- '.github/workflows/publish_release.yml'
- '.github/workflows/changelog_test.yml'
- '.github/workflows/rocky_build_test.yml'
- '.github/workflows/macos_build_test.yml'
- 'doc/**'
- 'CHANGELOG.rst'
push:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
ubuntu_versions : [
22.04,
]
pkg_mgr : [
apt,
]
name: Build, Test, Report Coverage
steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Cyclus
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build, Test, and Report Coverage
uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=ghcr.io/cyclus/cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus-coverage:ci-layer-cache
cache-to: type=registry,ref=ghcr.io/cyclus/cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cyclus-coverage:ci-layer-cache,mode=max,ignore-error=true
file: docker/Dockerfile
target: coverage-report
outputs: type=local,dest=.
build-args: |
pkg_mgr=${{ matrix.pkg_mgr }}
ubuntu_version=${{ matrix.ubuntu_versions }}
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
file: ${{ github.workspace }}/total_coverage.info
format: lcov
- name: Upload Coverage HTML Artifact
uses: actions/upload-pages-artifact@v3
with:
name: cyclus-coverage-report-${{ matrix.ubuntu_versions }}-${{ matrix.pkg_mgr }}
path: ${{ github.workspace }}/html