Skip to content

Merge pull request #210 from FrancisRussell/dependabot/github_actions… #1228

Merge pull request #210 from FrancisRussell/dependabot/github_actions…

Merge pull request #210 from FrancisRussell/dependabot/github_actions… #1228

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [master, develop]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build and unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/setup-node@v4
with:
node-version: 16.x
- run: npm ci
- run: npm run build
- run: npm run test
- uses: actions/upload-artifact@v3
with:
name: built-action
path: |
action.yml
dist
test:
name: Functionality tests
needs: build
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: built-action
- id: restore-cargo-cache
name: Cargo cache
uses: ./
with:
command: cache
cache-only: indices crates git-repos
min-recache-indices: 1h
- id: install-toolchain
uses: ./
name: Install toolchain
with:
command: install-rustup
toolchain: nightly
profile: minimal
target: wasm32-unknown-unknown
components: clippy rust-analysis
default: true
- id: install-grcov
name: Install grcov
uses: ./
with:
command: cargo install
args: grcov
- id: cargo-build
name: Cargo build (with cross)
uses: ./
with:
command: cargo build
args: --target=wasm32-unknown-unknown
use-cross: true
annotations: false
- id: cargo-clippy
name: Cargo clippy
uses: ./
with:
command: cargo clippy
- run: find ~/.cache
if: ${{ matrix.platform != 'windows-latest' }}
- run: find ~/.local
if: ${{ matrix.platform != 'windows-latest' }}
- run: rustc -Vv