From 2beecc11d590de669cf35ec25501435dc3862aaf Mon Sep 17 00:00:00 2001 From: Michael Stewart Date: Fri, 4 Nov 2022 12:51:55 -0400 Subject: [PATCH 1/5] update actions/checkout --- .github/workflows/api-docs.yml | 2 +- .github/workflows/release.yml | 10 +++++----- .github/workflows/test.yml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 99dd9735d..4079e4d13 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: persist-credentials: false - name: Set up cargo diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20129a2d9..54bfad9e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up docker image run: docker build -t volta . working-directory: ./ci/docker @@ -31,7 +31,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up cargo uses: actions-rs/toolchain@v1 with: @@ -53,7 +53,7 @@ jobs: runs-on: macos-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up cargo uses: actions-rs/toolchain@v1 with: @@ -76,7 +76,7 @@ jobs: runs-on: windows-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up cargo uses: actions-rs/toolchain@v1 with: @@ -138,7 +138,7 @@ jobs: if: github.event_name == 'push' steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Determine release version id: release_info env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72227e7d1..39faafff4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: RUST_BACKTRACE: full steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up cargo uses: actions-rs/toolchain@v1 with: @@ -54,7 +54,7 @@ jobs: RUST_BACKTRACE: full steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up cargo uses: actions-rs/toolchain@v1 with: @@ -76,7 +76,7 @@ jobs: - name: Setup BATS run: sudo npm install -g bats - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run tests run: bats dev/unix/tests/ @@ -85,7 +85,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up cargo uses: actions-rs/toolchain@v1 with: From f8a8e91dbc4aad2c73149253939cd9f740636202 Mon Sep 17 00:00:00 2001 From: Michael Stewart Date: Fri, 4 Nov 2022 13:07:57 -0400 Subject: [PATCH 2/5] switch to dtolnay/rust-toolchain --- .github/workflows/api-docs.yml | 4 +--- .github/workflows/release.yml | 12 +++--------- .github/workflows/test.yml | 12 +++--------- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 4079e4d13..9471f63e2 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -15,11 +15,9 @@ jobs: with: persist-credentials: false - name: Set up cargo - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Build docs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54bfad9e9..de191c61d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,11 +33,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 - name: Set up cargo - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Compile and package Volta @@ -55,12 +53,10 @@ jobs: - name: Check out code uses: actions/checkout@v3 - name: Set up cargo - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 target: aarch64-apple-darwin - override: true - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Compile and package Volta @@ -78,11 +74,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 - name: Set up cargo - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Add cargo-wix subcommand diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39faafff4..ba394c342 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,11 +24,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 - name: Set up cargo - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true components: clippy - name: Cargo Cache uses: Swatinem/rust-cache@v2 @@ -56,11 +54,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 - name: Set up cargo - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Run tests @@ -87,11 +83,9 @@ jobs: - name: Check out code uses: actions/checkout@v3 - name: Set up cargo - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true components: rustfmt - name: Cargo Cache uses: Swatinem/rust-cache@v2 From 6589df49c5bf7886f5b73eacf9241717cc57ac92 Mon Sep 17 00:00:00 2001 From: Michael Stewart Date: Fri, 4 Nov 2022 13:13:14 -0400 Subject: [PATCH 3/5] update actions/upload-artifact --- .github/workflows/release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index de191c61d..03b486f46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Compile and package Volta run: docker run --volume ${PWD}:/root/workspace --workdir /root/workspace --rm --init --tty volta /root/workspace/ci/build-linux.sh volta-linux - name: Upload release artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: linux path: target/release/volta-linux.tar.gz @@ -41,7 +41,7 @@ jobs: - name: Compile and package Volta run: ./ci/build-macos-x86_64.sh volta-macos - name: Upload release artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: macos path: target/release/volta-macos.tar.gz @@ -62,7 +62,7 @@ jobs: - name: Compile and package Volta run: ./ci/build-macos-arm.sh volta-macos-aarch64 - name: Upload release artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: macos-aarch64 path: target/aarch64-apple-darwin/release/volta-macos-aarch64.tar.gz @@ -111,12 +111,12 @@ jobs: run: powershell Compress-Archive volta*.exe volta-windows.zip working-directory: ./target/release - name: Upload installer - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: windows-installer path: target/wix/volta-windows.msi - name: Upload zip - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: windows-zip path: target/release/volta-windows.zip From 53c44af9970b3c5c888cef8ea0fc8138f912094e Mon Sep 17 00:00:00 2001 From: Michael Stewart Date: Fri, 4 Nov 2022 22:27:17 -0400 Subject: [PATCH 4/5] stop using set-output --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03b486f46..c6cfbee8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,7 +137,7 @@ jobs: id: release_info env: TAG: ${{ github.ref }} - run: echo "::set-output name=version::${TAG:11}" + run: echo "version=${TAG:11}" >> $GITHUB_OUTPUT - name: Fetch Linux artifact uses: actions/download-artifact@v2 with: From 100be2c970e1c5952eb2fa8bd898d375254dce0d Mon Sep 17 00:00:00 2001 From: Michael Stewart Date: Fri, 4 Nov 2022 23:04:19 -0400 Subject: [PATCH 5/5] remove actions-rs/cargo --- .github/workflows/api-docs.yml | 6 ++---- .github/workflows/release.yml | 11 +++-------- .github/workflows/test.yml | 28 +++++++++------------------- 3 files changed, 14 insertions(+), 31 deletions(-) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 9471f63e2..d53f17e53 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -21,10 +21,8 @@ jobs: - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Build docs - uses: actions-rs/cargo@v1 - with: - command: doc - args: --all --features cross-platform-docs --no-deps --document-private-items + run: | + cargo doc --all --features cross-platform-docs --no-deps --document-private-items - name: Prepare docs for publication run: | mkdir -p publish diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6cfbee8b..7f5072703 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,15 +80,10 @@ jobs: - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Add cargo-wix subcommand - uses: actions-rs/cargo@v1 - with: - command: install - args: cargo-wix + run: cargo install cargo-wix - name: Compile and package installer - uses: actions-rs/cargo@v1 - with: - command: wix - args: --nocapture --package volta --output target\wix\volta-windows.msi + run: | + cargo wix --nocapture --package volta --output target\wix\volta-windows.msi - name: Load Certificate File id: certificate_file if: github.event_name == 'push' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba394c342..a77f2ef0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,19 +31,13 @@ jobs: - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --all --features mock-network + run: | + cargo test --all --features mock-network - name: Lint with clippy - uses: actions-rs/cargo@v1 - with: - command: clippy + run: cargo clippy - name: Lint tests with clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --tests --features mock-network + run: | + cargo clippy --tests --features mock-network smoke-tests: name: Smoke Tests @@ -60,10 +54,8 @@ jobs: - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --test smoke --features smoke-tests -- --test-threads 1 + run: | + cargo test --test smoke --features smoke-tests -- --test-threads 1 shell-tests: name: Shell Script Tests @@ -90,7 +82,5 @@ jobs: - name: Cargo Cache uses: Swatinem/rust-cache@v2 - name: Run check - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all --quiet -- --check + run: | + cargo fmt --all --quiet -- --check