Skip to content

Commit

Permalink
ci: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sonro committed Jul 13, 2024
1 parent ba0cf8a commit bffbc39
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: release

permissions:
contents: write

on:
push:
tags:
Expand All @@ -9,27 +12,27 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable

- name: Wait for tests to succeed
uses: lewagon/wait-on-check-action@v1.0.0
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.ref }}
check-regexp: tests.*
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

- name: Install stable
uses: dtolnay/rust-toolchain@stable

- name: cargo publish
run: cargo publish --token ${{ secrets.CRATES_TOKEN }}

create-release:
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: taiki-e/create-gh-release-action@v1
with:
Expand Down
28 changes: 11 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,18 @@ jobs:
rust: [1.32.0, stable]
on:
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
- { os: macos-11, target: x86_64-apple-darwin }
- { os: macos-latest, target: x86_64-apple-darwin }
- { os: windows-latest, target: x86_64-pc-windows-msvc }

runs-on: ${{ matrix.on.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.on.target }}

- name: Generate lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: Build tests
run: cargo test --no-run --locked --all-features

Expand All @@ -48,7 +44,7 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -62,7 +58,7 @@ jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -75,7 +71,7 @@ jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -88,7 +84,7 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -98,21 +94,19 @@ jobs:
- name: cargo install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile

- name: llvm-cov
run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info

- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code_coverage_result
path: lcov.info

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env: CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
fail_ci_if_error: true
fail_ci_if_error: false

0 comments on commit bffbc39

Please sign in to comment.