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

Replace unmaintained/outdated GitHub Actions #1317

Merged
merged 2 commits into from
Feb 28, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
41 changes: 19 additions & 22 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,26 @@ jobs:

steps:
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.job.target }}
profile: minimal
override: true
targets: ${{ matrix.job.target }}
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install cross
if: matrix.job.use-cross
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Cargo build
env:
MACOSX_DEPLOYMENT_TARGET: 10.7
uses: actions-rs/cargo@v1
with:
command: build
use-cross: ${{ matrix.job.use-cross }}
args: --release --target ${{ matrix.job.target }}
shell: bash
run: |
if [[ "${{ matrix.job.cross }}" == "true" ]]; then
cross build --release --target ${{ matrix.job.target }}
else
cargo build --release --target ${{ matrix.job.target }}
fi

- name: Install required dependencies
shell: bash
Expand Down Expand Up @@ -90,22 +94,15 @@ jobs:
name: Publishing to Cargo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CARGO_API_KEY }} --allow-dirty
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo publish --token ${{ secrets.CARGO_API_KEY }} --allow-dirty

bump-homebrew-formula:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Bump Homebrew formulae
uses: dawidd6/action-homebrew-bump-formula@v3
with:
Expand Down
76 changes: 30 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,24 @@ jobs:
use-cross: true
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.job.target }}
profile: minimal
override: true
- name: Unit tests
uses: actions-rs/cargo@v1
targets: ${{ matrix.job.target }}
- name: Install cross
if: matrix.job.use-cross
uses: taiki-e/install-action@v2
with:
command: test
use-cross: ${{ matrix.job.use-cross }}
args: --target ${{ matrix.job.target }} --verbose -- --nocapture
tool: cross
- name: Unit tests
shell: bash
run: |
if [[ "${{ matrix.job.use-cross }}" == "true" ]]; then
cross test --target ${{ matrix.job.target }} --verbose -- --nocapture
else
cargo test --target ${{ matrix.job.target }} --verbose -- --nocapture
fi

integration_tests:
name: Integration tests
Expand All @@ -65,18 +69,11 @@ jobs:
target: x86_64-unknown-linux-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
uses: dtolnay/rust-toolchain@stable
- name: Build for release
uses: actions-rs/cargo@v1
with:
command: build
args: --target ${{ matrix.target }} --release
run: cargo build --target ${{ matrix.target }} --release
- name: End to end tests
run: |
DELTA_BIN=target/${{ matrix.target }}/release/delta
Expand All @@ -90,54 +87,41 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
components: clippy
- name: Clippy Check
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings

coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@v2
with:
toolchain: stable
override: true
tool: cargo-tarpaulin
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
args: '--ignore-tests --out Lcov --output-dir target/tarpaulin'
run: cargo tarpaulin --ignore-tests --out Lcov --output-dir target/tarpaulin
- name: Upload to Coveralls
# upload only if push
if: ${{ github.event_name == 'push' }}
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: doc
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
Expand Down