name: Validate
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: artifacts/tsgo.wasm.zst
key: tsgo-wasm-${{ hashFiles('artifacts/tsgo.rev') }}
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Ensure tsgo module
run: |
SHA=$(cat artifacts/tsgo.sha256)
if [ ! -f artifacts/tsgo.wasm.zst ] || [ "$(sha256sum artifacts/tsgo.wasm.zst | cut -d' ' -f1)" != "$SHA" ]; then
make tsgo
fi
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --check
- run: cargo test --release
- run: cargo check --no-default-features