Skip to content

add more ci

add more ci #13

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
format:
name: format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy -- -D warnings
test:
name: tests (${{ matrix.rust }})
runs-on: ubuntu-latest
strategy:
matrix:
# keep this in sync with the rust-version in cargo.toml
rust: ['1.62', stable]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.HEGEL_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- run: cargo test
conformance:
name: conformance tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.HEGEL_DEPLOY_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Install hegel
run: |
pip install git+ssh://git@github.com/antithesishq/hegel.git
pip install pytest
- name: Build conformance binaries
working-directory: tests/conformance/rust
run: cargo build --release
- name: Run conformance tests
working-directory: tests/conformance
run: pytest test_conformance.py -v