-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: setup linux workflow with GitHub Actions
- Loading branch information
1 parent
fe9cf2b
commit ba27c36
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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 cargo-junit | ||
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 junit --name .testresults/unit/junit.xml | ||
|
||
- name: Setup testspace publisher | ||
uses: testspace-com/setup-testspace@v1 | ||
with: | ||
domain: ${{github.repository_owner}} | ||
if: always() | ||
|
||
- name: Publish test results | ||
run: testspace .testresults/unit/junit.xml | ||
if: always() | ||
|