diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..0445a99 --- /dev/null +++ b/.github/workflows/linux.yml @@ -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/tarpaulin@v0.1 + 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 +