Skip to content
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
87 changes: 17 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Based on https://github.com/actions-rs/meta/blob/master/recipes/msrv.md

name: ci
on:
pull_request:
Expand All @@ -11,25 +9,10 @@ jobs:
check:
name: check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check

test:
name: test
Expand All @@ -44,15 +27,10 @@ jobs:
- rust: 1.46.0
msrv: true
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true

# See https://github.com/matklad/once_cell/issues/201
# To test locally, enable the lock file and then run:
Expand All @@ -61,31 +39,15 @@ jobs:
if: ${{ matrix.msrv }}
run: cp Cargo.lock.msrv Cargo.lock

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

fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --all -- --check

coverage:
name: coverage
Expand All @@ -94,15 +56,8 @@ jobs:
image: xd009642/tarpaulin
options: --security-opt seccomp=unconfined
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Generate code coverage
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --out Xml

- uses: actions/checkout@v4
- run: cargo tarpaulin --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
Expand All @@ -116,17 +71,9 @@ jobs:
run:
working-directory: demo
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal

- name: yarn
run: yarn

- name: yarn build
run: yarn build
- uses: actions/checkout@v4
# Waiting for new wasm-bindgen release to run with newer rust:
# https://github.com/rustwasm/wasm-bindgen/issues/4211
- uses: dtolnay/[email protected]
- run: yarn
- run: yarn build
18 changes: 6 additions & 12 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ jobs:
run:
working-directory: demo
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: actions/checkout@v4
# Waiting for new wasm-bindgen release to run with newer rust:
# https://github.com/rustwasm/wasm-bindgen/issues/4211
- uses: dtolnay/[email protected]

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal

- name: yarn
run: yarn
- run: yarn

- name: yarn build
run: yarn build
- run: yarn build

- name: Deploy to gh-pages
uses: JamesIves/[email protected]
Expand Down