-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Added rudimentary CI pipeline running unit tests
- Loading branch information
1 parent
c8f0442
commit 448f457
Showing
3 changed files
with
89 additions
and
10 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,77 @@ | ||
name: evm-signer-kms | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- feat/** | ||
- fix/** | ||
- chore/** | ||
- ci/** | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run-tests: | ||
name: Execute tests and measure coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
LCOV_UT_OUT: unit-test-cov.lcov | ||
LCOV_IT_OUT: integration-test-cov.lcov | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install llvm-cov for code coverage | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Run unit tests and measure coverage | ||
env: | ||
LLVM_COV_ARGS: --lcov --output-path ${{ env.LCOV_UT_OUT }} --lib | ||
run: make test-coverage ARGS="${{ env.LLVM_COV_ARGS }}" | ||
|
||
# - name: Run integration tests and measure coverage | ||
# env: | ||
# LLVM_COV_ARGS: --lcov --output-path ${{ env.LCOV_IT_OUT }} --tests | ||
# run: make test-coverage ARGS="${{ env.LLVM_COV_ARGS }}" | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: | ||
${{ env.LCOV_UT_OUT }} | ||
# ${{ env.LCOV_IT_OUT }} | ||
fail_ci_if_error: true | ||
|
||
build-x86-gnu: | ||
name: Build for x86_64-unknown-linux-gnu | ||
env: | ||
TOOL_CHAIN : x86_64-unknown-linux-gnu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build for ${{ env.TOOL_CHAIN }} | ||
env: | ||
ARGS: --target=${{ env.TOOL_CHAIN }} | ||
run: make ARGS=${{ env.ARGS }} build | ||
|
||
build-x86-musl: | ||
name: Build for x86_64-unknown-linux-musl | ||
env: | ||
TOOL_CHAIN : x86_64-unknown-linux-musl | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install musl toolchain | ||
run: | | ||
sudo apt install musl-tools | ||
rustup target add --toolchain stable ${{ env.TOOL_CHAIN }} | ||
- name: Build for ${{ env.TOOL_CHAIN }} | ||
env: | ||
ARGS: --target=${{ env.TOOL_CHAIN }} | ||
run: make ARGS=${{ env.ARGS }} build |
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
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