69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
name: Check
|
|
|
|
on:
|
|
push:
|
|
branches: ['main']
|
|
pull_request:
|
|
branches: ['main']
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUSTFLAGS: '-Dwarnings'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22.x'
|
|
check-latest: true
|
|
|
|
- name: Cache Rust dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Cache npm dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
reconcile-js/node_modules
|
|
examples/website/node_modules
|
|
~/.npm
|
|
key: >-
|
|
${{ runner.os }}-npm-${{
|
|
hashFiles(
|
|
'reconcile-js/package-lock.json',
|
|
'examples/website/package-lock.json'
|
|
)
|
|
}}
|
|
restore-keys: |
|
|
${{ runner.os }}-npm-
|
|
|
|
- name: Install Rust toolchain
|
|
run: |
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
|
|
| sh -s -- -y --default-toolchain none --profile minimal
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Lint
|
|
run: scripts/lint.sh
|
|
|
|
- name: Test
|
|
run: scripts/test.sh
|
|
|
|
- name: Build website
|
|
run: scripts/build-website.sh
|