Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: setup linux workflow with GitHub Actions #158

Merged
merged 4 commits into from
Jul 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: linux
on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ubuntu-latest
name: linux

steps:
- name: checkout
uses: actions/checkout@v2

- name: setup
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
override: true
profile: minimal
default: true

- name: prep test tools
run: |
cargo install cargo2junit
mkdir -p .testresults/unit
mkdir -p .coverage/unit

- name: generate code coverage
uses: actions-rs/[email protected]
with:
args: '-o Xml --exclude-files *_test.rs,main.rs --output-dir .coverage/unit'

- name: generate junit unit test results
run: |
cargo test -- -Z unstable-options --format json --report-time | cargo2junit > .testresults/unit/junit.xml

- name: setup testspace publisher
uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}
if: always()

- name: publish unit test results
run: testspace .testresults/unit/junit.xml
if: always()

- name: publish code coverage results
uses: codecov/codecov-action@v2