diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..819365f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +# Fast, deterministic checks on every PR and on main. The slow testnet integration +# scripts (pool/scripts/*.mjs) are run manually, not here. +on: + push: + branches: [main] + pull_request: + +jobs: + contracts: + name: contracts · cargo test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + workspaces: contracts + - name: cargo test -p pool + working-directory: contracts + run: cargo test -p pool + + app: + name: app · vitest + build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + cache-dependency-path: app/package-lock.json + - name: install + working-directory: app + run: npm ci + - name: vitest + working-directory: app + run: npm test + - name: next build + working-directory: app + run: npm run build