diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 99dd9735d..d53f17e53 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -11,22 +11,18 @@ 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 - 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 - 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 20129a2d9..7f5072703 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,14 +14,14 @@ 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 - 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 @@ -31,19 +31,17 @@ 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 + 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 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 @@ -53,20 +51,18 @@ 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 + 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 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 @@ -76,25 +72,18 @@ 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 + 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 - 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' @@ -117,12 +106,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 @@ -138,12 +127,12 @@ 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: 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: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72227e7d1..a77f2ef0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,30 +22,22 @@ 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 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true components: clippy - 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 @@ -54,20 +46,16 @@ 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 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true - 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 @@ -76,7 +64,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,18 +73,14 @@ 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 + uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: 1.63 - override: true components: rustfmt - 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