From db0789d49b17b9ea2986a93767e255c1f6fb65f4 Mon Sep 17 00:00:00 2001 From: Liam Bigelow <40188355+bglw@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:45:55 +1200 Subject: [PATCH] have toolproof test itself non-concurrently to avoid chrome-locks --- .github/workflows/release.yml | 36 +++++++++++++++++------------------ .github/workflows/test.yml | 23 ++++++++++++---------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da8cc07..7864351 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,10 +31,10 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: stable - override: true - default: true - components: rustfmt, clippy + toolchain: stable + override: true + default: true + components: rustfmt, clippy - name: Get Version run: echo GIT_VERSION="$(git describe --tags | sed 's/^v\(.*\)$/\1/')" >> $GITHUB_ENV @@ -47,7 +47,7 @@ jobs: git checkout -b deploy_branch - name: Prepare Crates run: | - # Update cargo version, + # Update cargo version, node ./.backstage/version.cjs git add ./toolproof/Cargo.toml # Commit changes so cargo doesn't complain about dirty repo @@ -156,7 +156,6 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - publish-github-release: name: Publish to GitHub runs-on: ubuntu-20.04 @@ -317,19 +316,19 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt update -y - sudo apt install -y musl-tools musl-dev clang gcc-aarch64-linux-gnu + sudo apt install -y musl-tools musl-dev clang gcc-aarch64-linux-gnu echo "TARGET_CC=clang" >> $GITHUB_ENV echo "CFLAGS_aarch64_unknown_linux_musl=--sysroot=/usr/aarch64-linux-gnu" >> $GITHUB_ENV echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=/usr/aarch64-linux-gnu/bin/ld" >> $GITHUB_ENV - + - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: ${{ matrix.rust }} - target: ${{ matrix.target }} - override: true - default: true - components: rustfmt, clippy + toolchain: ${{ matrix.rust }} + target: ${{ matrix.target }} + override: true + default: true + components: rustfmt, clippy - name: Prepare Git run: | @@ -340,7 +339,7 @@ jobs: git checkout -b deploy_branch - name: Prepare Crates run: | - # Update cargo version, + # Update cargo version, node ./.backstage/version.cjs git add ./toolproof/Cargo.toml # Commit changes so cargo doesn't complain about dirty repo @@ -352,15 +351,15 @@ jobs: - name: Test Lib if: matrix.run_tests == true - working-directory: ./toolproof + working-directory: ./toolproof run: cargo test --release --target ${{ matrix.target }} - name: Test CLI if: matrix.run_tests == true working-directory: ./toolproof - # toolproof tests itself when run - run: cargo run -- --placeholders toolproof_path="$(pwd)/../target/debug/toolproof" - + # toolproof tests itself when run + run: cargo run -- --placeholders toolproof_path="$(pwd)/../target/debug/toolproof" -c 1 + # TODO: build and package pagebrowse - name: Create Release Assets run: | @@ -408,4 +407,3 @@ jobs: name: release-checksums path: | ${{ env.CHECKSUM_PATH }} - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb5bba1..021e658 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,6 +17,7 @@ jobs: run: shell: bash strategy: + fail-fast: false matrix: include: - build: linux @@ -40,26 +41,28 @@ jobs: with: fetch-depth: 1 + - uses: Swatinem/rust-cache@v2 + - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: ${{ matrix.rust }} - target: ${{ matrix.target }} - override: true - default: true - components: rustfmt, clippy - - - uses: Swatinem/rust-cache@v2 + toolchain: ${{ matrix.rust }} + target: ${{ matrix.target }} + override: true + default: true + components: rustfmt, clippy - name: Build Lib working-directory: ./toolproof run: cargo build - name: Test Lib - working-directory: ./toolproof + working-directory: ./toolproof run: cargo test + - uses: browser-actions/setup-chrome@v1 + - name: Test CLI working-directory: ./toolproof - # toolproof tests itself when run - run: cargo run -- --placeholders toolproof_path="$(pwd)/../target/debug/toolproof" + # toolproof tests itself when run + run: cargo run -- --placeholders toolproof_path="$(pwd)/../target/debug/toolproof" -c 1