From 9d3d2b17952c2f1d547019209f28cdeedb12f261 Mon Sep 17 00:00:00 2001 From: Jason Shin Date: Sun, 27 Aug 2023 20:46:25 +1000 Subject: [PATCH] chore: moving coverage out from main build --- .github/workflows/coverage.yaml | 39 +++++++++++++++++++++++++++++++ .github/workflows/test.yaml | 41 +-------------------------------- 2 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/coverage.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 00000000..6d1bba8c --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,39 @@ +name: coverage + +on: + schedule: + - cron: '0 1 * * *' + +env: + CARGO_TERM_COLOR: always + +jobs: + coverage: + runs-on: ubuntu-latest + + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: build docker-compose services for integration tests + run: docker-compose -f docker-compose.yml up -d + + - uses: GuillaumeFalourd/wait-sleep-action@v1 + with: + time: '10' # for 10 seconds + + - name: Check the docker-compose services running + run: docker ps -a + + - name: Install tarpaulin + run: cargo install cargo-tarpaulin + + - name: Run coverage + run: cargo tarpaulin --tests -o html -b --coveralls ${{ secrets.COVERALLS_KEY }} --engine Llvm diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e56e0c57..dbb6bd98 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,9 +11,7 @@ env: jobs: build: - runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' steps: - name: Checkout sources @@ -36,42 +34,5 @@ jobs: - name: Check the docker-compose services running run: docker ps -a - - name: Install tarpaulin - run: cargo install cargo-tarpaulin - - - name: tarpaulin version - run: cargo tarpaulin --version - - name: Run tests - run: cargo tarpaulin --tests --fail-under 78 --engine Llvm - - coverage: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - name: build docker-compose services for integration tests - run: docker-compose -f docker-compose.yml up -d - - - uses: GuillaumeFalourd/wait-sleep-action@v1 - with: - time: '10' # for 10 seconds - - - name: Check the docker-compose services running - run: docker ps -a - - - name: Install tarpaulin - run: cargo install cargo-tarpaulin - - - name: Run coverage - run: cargo tarpaulin --tests -o html -b --coveralls ${{ secrets.COVERALLS_KEY }} --engine Llvm + run: cargo test