Skip to content

Maintenance

Maintenance #211

Workflow file for this run

name: Continuous integration
on: [push, pull_request]
jobs:
assets:
name: Build assets
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install pnpm and node
uses: pnpm/setup@v2
with:
version: ^11
runtime: node@26
cache: true
- name: Format UI assets
run: pnpm fmt:check
- name: Build UI assets
run: pnpm build
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Cache Rust
uses: ./.github/actions/cargo-cache
with:
key: assets
- name: Convert assets to Rust
run: cargo xtask assets
- name: Upload assets
uses: actions/upload-artifact@v7
with:
name: assets
path: src/html/assets.rs
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.81 # MSRV
- stable
- nightly
needs: assets
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Download assets
uses: actions/download-artifact@v8
with:
name: assets
path: src/html
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Cache Rust
uses: ./.github/actions/cargo-cache
with:
key: build-${{ matrix.rust }}
- name: Build code
run: cargo build
- name: Upload binary
uses: actions/upload-artifact@v7
with:
name: binary-${{ matrix.rust }}
path: target/debug/margo
check:
name: Check
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Download assets
uses: actions/download-artifact@v8
with:
name: assets
path: src/html
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy
- name: Cache Rust
uses: ./.github/actions/cargo-cache
with:
key: check
lockfiles: |-
Cargo.lock
conformance/Cargo.lock
targets: |-
target
conformance/target
- name: Download binary
uses: actions/download-artifact@v8
with:
name: binary-stable
path: .
- name: Register binary
run: |
MARGO_BINARY="$(pwd)/margo"
chmod +x "${MARGO_BINARY}"
echo "MARGO_BINARY=${MARGO_BINARY}" >> $GITHUB_ENV
echo "${MARGO_BINARY}"
"${MARGO_BINARY}" --help
- name: Format code
run: cargo fmt --all -- --check
- name: Lint code
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test binary
run: cargo test
- name: Test conformance
run: cd conformance && cargo run
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: integration-tests
bundler-cache: true
- name: Lint UI Tests
run: cd integration-tests && bundle exec rubocop
- name: Test UI
run: cd integration-tests && bundle exec rspec