Skip to content

Type check generic methods on classes #1861

Type check generic methods on classes

Type check generic methods on classes #1861

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
paths:
- "**.esc"
- "**.js"
- "**.rs"
- ".github/workflows/ci.yml"
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-clippy
- name: Clippy
run: cargo clippy --all-features --no-deps
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
- name: Install node_modules
run: yarn install --frozen-lockfile
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-test
- name: Test
run: cargo test
coverage:
name: Coverage
runs-on: ubuntu-latest
container:
image: ghcr.io/escalier-lang/rust-grcov
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Nodejs and npm
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
- name: Install node_modules
run: yarn install --frozen-lockfile
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-coverage
- name: Test
run: CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test
- name: Create Folder
run: mkdir -p target/coverage
- name: Generate lcov
run: grcov . --excl-line "(unreachable|todo)!" --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" --ignore "target/**" --ignore "*_test.rs" -o target/coverage/tests.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
directory: target/coverage
playground:
name: Build Playground
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
node_modules/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-build-wasm
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build Demo
run: yarn build