Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update deprecated actions #1373

Merged
merged 5 commits into from
Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 17 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -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
Expand All @@ -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:
Expand Down
48 changes: 16 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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/

Expand All @@ -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