Merge pull request #269 from koto-lang/derive-macros #634
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
strategy: | |
matrix: | |
os: [macos-12, ubuntu-22.04, windows-2022] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Run poetry example | |
run: cargo run --example poetry -- -s examples/poetry/scripts/readme.koto | |
build_and_test_release: | |
# We don't need to test release builds on all platforms for now | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Test with optimizations | |
run: cargo test --release --all-features --verbose | |
code_checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt, clippy | |
- uses: extractions/setup-just@v1 | |
- name: Check formatting | |
run: just fmt | |
- name: Clippy | |
run: just clippy | |
- name: Docs | |
run: just doc | |
wasm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- uses: jetli/wasm-pack-action@v0.3.0 | |
with: | |
version: v0.10.3 | |
- name: Run wasm example tests | |
run: cd examples/wasm && wasm-pack test --node |