Skip to content

Commit

Permalink
Update Github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-zen authored Nov 7, 2023
1 parent 52c40ab commit 2c004c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@ jobs:
deploy:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.58.1
override: true
- uses: Swatinem/rust-cache@v1

- name: Run cargo doc
uses: actions-rs/cargo@v1
with:
command: doc

- name: Override index.html
- name: Generate docs
run: |
cargo doc
REPO_NAME=$(echo ${{ github.repository }} | cut -d '/' -f 2)
echo "<meta http-equiv=refresh content=0;url=${REPO_NAME}/index.html>" > target/doc/index.html
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,19 @@ jobs:
rust: [1.58.1]
os: [macOS-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Check format
run: cargo fmt --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Check clippy
run: cargo clippy -- -D warnings

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: Run tests
run: cargo test

0 comments on commit 2c004c5

Please sign in to comment.