Skip to content

Update rust-lang/crates-io-auth-action action to v1.0.4 (#309) #857

Update rust-lang/crates-io-auth-action action to v1.0.4 (#309)

Update rust-lang/crates-io-auth-action action to v1.0.4 (#309) #857

Workflow file for this run

name: test
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- trunk
workflow_dispatch:
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
ROW_COLOR: always
CLICOLOR: 1
jobs:
unit_test:
name: Unit test [${{ matrix.mode }}-rust-${{ matrix.rust }}-${{ matrix.os }}]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-24.04
- macos-14
rust:
- 1.88.0
- 1.94.0
mode:
- debug
include:
# Add a release build on linux with the latest version of rust
- os: ubuntu-24.04
rust: 1.94.0
mode: release
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Configure Rust
id: rust_toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: ${{ matrix.rust }}
- name: Cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
key: ${{ matrix.mode }}
cache-bin: false
- name: Build
run: cargo build ${{ matrix.mode == 'release' && '--release' || '' }} --verbose
- name: Run tests
run: cargo test ${{ matrix.mode == 'release' && '--release' || '' }} --verbose
execute_tutorials:
name: Execute tutorials
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Configure Rust
id: rust_toolchain
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: 1.94.0
- name: Cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
cache-bin: false
- name: Install
run: cargo install --path . --locked --verbose
- name: Run hello.sh
run: bash hello.sh
working-directory: doc/src/guide/tutorial
env:
ROW_YES: "true"
- name: Run group.sh
run: bash group.sh
working-directory: doc/src/guide/tutorial
env:
ROW_YES: "true"
# The signac test requires python
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.14"
- name: Set up Python environment
uses: glotzerlab/workflows/setup-uv@204dc7c0f82720090703712694b7cab761aacaa0 # 0.13.0
with:
lockfile: ".github/workflows/signac-requirements.txt"
- name: Run signac.sh
run: bash signac.sh
working-directory: doc/src/guide/python
env:
ROW_YES: "true"
build_documentation:
name: Build documentation
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up mdbook
uses: glotzerlab/workflows/setup-mdbook@204dc7c0f82720090703712694b7cab761aacaa0 # 0.13.0
with:
mdbook_version: 0.5.0
- name: Build documentation
run: mdbook build doc
env:
RUST_LOG: "mdbook=info"
tests_complete:
name: All tests
if: always()
needs: [unit_test, execute_tutorials, build_documentation]
runs-on: ubuntu-24.04
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
- name: Done
run: exit 0