Utilize Rollup to Bundle Action File #490
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
standard-usage: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows, ubuntu, macos] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build Sample Project | |
uses: threeal/[email protected] | |
with: | |
source-dir: sample | |
generator: Ninja | |
cxx-compiler: g++ | |
run-build: true | |
- name: Test Sample Project | |
uses: threeal/[email protected] | |
with: | |
test-dir: sample/build | |
- name: Use this action | |
uses: ./ | |
llvm-usage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Install LLVM | |
run: sudo apt-get install -y llvm | |
- name: Build Sample Project | |
uses: threeal/[email protected] | |
with: | |
source-dir: sample | |
generator: Ninja | |
c-compiler: clang | |
cxx-compiler: clang++ | |
run-build: true | |
- name: Test Sample Project | |
uses: threeal/[email protected] | |
with: | |
test-dir: sample/build | |
- name: Use this action with llvm-cov as the gcov executable | |
uses: ./ | |
with: | |
gcov-executable: llvm-cov gcov | |
exclusion-usage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build Sample Project | |
uses: threeal/[email protected] | |
with: | |
source-dir: sample | |
generator: Ninja | |
cxx-compiler: g++ | |
args: -DTEST_EVEN=OFF -DTEST_ODD=OFF | |
run-build: true | |
- name: Test Sample Project | |
uses: threeal/[email protected] | |
with: | |
test-dir: sample/build | |
- name: Use this action without an exclusion | |
id: failed_step | |
continue-on-error: true | |
uses: ./ | |
with: | |
root: sample | |
fail-under-line: 100 | |
- name: Check if the previous step did fail | |
run: ${{ steps.failed_step.outcome == 'failure' && true || false }} | |
- name: Use this action without an exclusion but with a lower fail threshold | |
uses: ./ | |
with: | |
root: sample | |
fail-under-line: 50 | |
- name: Use this action with an exclusion | |
uses: ./ | |
with: | |
root: sample | |
excludes: sample/include/* | |
fail-under-line: 100 | |
- name: Use this action with multiple exclusions | |
uses: ./ | |
with: | |
root: sample | |
excludes: | | |
sample/include/is_even.hpp | |
sample/include/is_odd.hpp | |
fail-under-line: 100 | |
xml-out-usage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build Sample Project | |
uses: threeal/[email protected] | |
with: | |
source-dir: sample | |
run-build: true | |
- name: Test Sample Project | |
uses: threeal/[email protected] | |
with: | |
test-dir: sample/build | |
- name: Use this action to generate an XML report | |
uses: ./ | |
with: | |
xml-out: coverage.xml | |
- name: Check if that XML report does exist | |
run: cat coverage.xml | |
coveralls-usage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build Sample Project | |
uses: threeal/[email protected] | |
with: | |
source-dir: sample | |
run-build: true | |
- name: Test Sample Project | |
uses: threeal/[email protected] | |
with: | |
test-dir: sample/build | |
- name: Use this action to generate a Coveralls report | |
uses: ./ | |
with: | |
coveralls-out: coveralls.json | |
- name: Check if that Coveralls report does exist | |
run: cat coveralls.json | |
- name: Use this action to generate and send another Coveralls report | |
uses: ./ | |
with: | |
coveralls-send: true |