|
|
|
@ -1,10 +1,6 @@
|
|
|
|
|
name: svg2gcode
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches: [ master ]
|
|
|
|
|
pull_request:
|
|
|
|
|
branches: [ master ]
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
@ -13,21 +9,42 @@ jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: Build
|
|
|
|
|
run: cargo build
|
|
|
|
|
- name: Run cargo-tarpaulin
|
|
|
|
|
uses: actions-rs/tarpaulin@v0.1
|
|
|
|
|
coverage:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
with:
|
|
|
|
|
version: '0.14.2'
|
|
|
|
|
args: '-- --nocapture --test-threads 1'
|
|
|
|
|
- name: Upload to codecov.io
|
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
|
fetch-depth: 0
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
|
with:
|
|
|
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
|
|
|
|
|
|
|
|
- name: Archive code coverage results
|
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
|
toolchain: nightly
|
|
|
|
|
override: true
|
|
|
|
|
profile: minimal
|
|
|
|
|
components: llvm-tools-preview
|
|
|
|
|
- uses: actions-rs/install@v0.1
|
|
|
|
|
with:
|
|
|
|
|
crate: grcov
|
|
|
|
|
version: 0.7.1
|
|
|
|
|
use-tool-cache: true
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
|
with:
|
|
|
|
|
name: code-coverage-report
|
|
|
|
|
path: cobertura.xml
|
|
|
|
|
command: build
|
|
|
|
|
env:
|
|
|
|
|
RUSTFLAGS: '-Zinstrument-coverage'
|
|
|
|
|
RUSTDOCFLAGS: '-Zinstrument-coverage'
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
|
with:
|
|
|
|
|
command: test
|
|
|
|
|
args: --all-features --no-fail-fast
|
|
|
|
|
env:
|
|
|
|
|
RUSTFLAGS: '-Zinstrument-coverage'
|
|
|
|
|
RUSTDOCFLAGS: '-Zinstrument-coverage'
|
|
|
|
|
LLVM_PROFILE_FILE: 'codecov-instrumentation-%p-%m.profraw'
|
|
|
|
|
- name: grcov
|
|
|
|
|
run: grcov . -s . --binary-path ./target/debug/ -t lcov --branch -o lcov.info
|
|
|
|
|
- uses: codecov/codecov-action@v1
|
|
|
|
|
with:
|
|
|
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
|
|
|