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

chore: testing rust cache #91

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
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
103 changes: 51 additions & 52 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
---
name: Task - Rust Tests & Coverage

on:
workflow_dispatch:
workflow_call:

jobs:
coverage:
# sadly, for now we have to "rebuild" for the coverage
runs-on: ubuntu-latest

services:
localstack:
image: localstack/localstack
env:
SERVICES: s3, sqs
DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: "AWS_ACCESS_KEY_ID"
AWS_SECRET_ACCESS_KEY: "AWS_SECRET_ACCESS_KEY"
ports:
- 4566:4566
mongodb:
image: mongo:latest
ports:
- 27017:27017

steps:
- uses: actions/checkout@v3

# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- run: rustup show

- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest

- name: Clean workspace
run: |
cargo llvm-cov clean --workspace

- name: Run llvm-cov
run: |
cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1

- name: Coveralls
uses: coverallsapp/github-action@v2
with:
files: lcov.info
debug: true

- uses: colpal/actions-clean@v1
if: ${{ always() }} # To ensure this step runs even when earlier steps fail
name: Task - Rust Tests & Coverage

on:
push:

jobs:
coverage:
# sadly, for now we have to "rebuild" for the coverage
runs-on: ubuntu-latest

services:
localstack:
image: localstack/localstack
env:
SERVICES: s3, sqs
DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: "AWS_ACCESS_KEY_ID"
AWS_SECRET_ACCESS_KEY: "AWS_SECRET_ACCESS_KEY"
ports:
- 4566:4566
mongodb:
image: mongo:latest
ports:
- 27017:27017

steps:
- uses: actions/checkout@v3

# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- run: rustup show

- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest

- name: Clean workspace
run: |
cargo llvm-cov clean --workspace

- name: Run llvm-cov
run: |
cargo llvm-cov nextest --release --lcov --output-path lcov.info --test-threads=1

- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: false

- uses: colpal/actions-clean@v1
if: ${{ always() }} # To ensure this step runs even when earlier steps fail
2 changes: 1 addition & 1 deletion .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Task - Build Rust
name: Task - Build Rust Test

on:
workflow_dispatch:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## Added

- enabled Rust Cache for Github Actions.
- added coveralls support
- moved mongodb serde behind feature flag
- implemented DA worker.
Expand Down
Loading