Skip to content

Merge pull request #41 from cboudereau/dependencies/update #201

Merge pull request #41 from cboudereau/dependencies/update

Merge pull request #41 from cboudereau/dependencies/update #201

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches:
- '*'
env:
CARGO_TERM_COLOR: always
EXAMPLE_BUCKET: gcs-rsync-dev
EXAMPLE_PREFIX: example-ci
TEST_BUCKET: gcs-rsync-dev
TEST_PREFIX: integration-test-ci
TEST_SERVICE_ACCOUNT: service_account.json
GOOGLE_APPLICATION_CREDENTIALS: default_token.json
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: fmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy --all-targets --all-features -- -D warnings
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: build
run: cargo build --verbose
- name: unit tests
run: cargo test --lib --verbose
check:
name: code coverage (unit + integration tests)
env:
GOOGLE_APPLICATION_CREDENTIALS_TOKEN: ${{ secrets.TEST_GOOGLE_APPLICATION_CREDENTIALS_TOKEN }}
TEST_SERVICE_ACCOUNT_TOKEN: ${{ secrets.TEST_SERVICE_ACCOUNT_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup test default token
run: 'echo "$GOOGLE_APPLICATION_CREDENTIALS_TOKEN" > default_token.json'
- name: Setup test service_account token
run: 'echo "$TEST_SERVICE_ACCOUNT_TOKEN" > service_account.json'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: llvm-tools-preview
- name: Download grcov
run: |
mkdir -p "${HOME}/.local/bin"
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin"
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Coverage
run: cargo run --manifest-path ./xtask/Cargo.toml -- coverage
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
files: coverage/*.lcov