Skip to content

Initial commit

Initial commit #64

Workflow file for this run

---
name: Rust CI
"on":
push:
branches:
- main
pull_request:
branches:
- main
env:
DEBIAN_FRONTEND: noninteractive
jobs:
lint:
strategy:
fail-fast: false
matrix:
job:
- clippy
include:
- job: rustfmt
toolchain: nightly
components: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- if: ${{ matrix.toolchain }}
name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: ${{ matrix.components }}
- if: ${{ ! matrix.toolchain }}
name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with:
tool: just
- name: Lint
run: just ci-lint-${{ matrix.job }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with:
tool: just
- name: Build
run: just ci-build-rust
test:
strategy:
fail-fast: false
matrix:
job:
- rust
- sanity
runs-on: ubuntu-latest
env:
KRB5_TRACE: /dev/stderr
steps:
- uses: actions/checkout@v4
- name: Install poetry & deps
shell: bash
run: |
pipx install poetry || true
- name: Setup python and restore poetry
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
cache: "poetry"
- name: Install Python dependencies
run: poetry install --only=test
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with:
tool: just
- name: Test
run: poetry run just ci-test-${{ matrix.job }}
check:
if: always()
needs:
- lint
- build
- test
runs-on: ubuntu-latest
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
release:
needs:
- check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- crate: kadmin-sys
extra_args: "--no-verify"
- crate: kadmin
extra_args: ""
if: github.event_name == 'push' && startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))

Check failure on line 107 in .github/workflows/ci-rust.yml

View workflow run for this annotation

GitHub Actions / Rust CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci-rust.yml (Line: 107, Col: 9): Unrecognized named-value: 'matrix'. Located at position 88 within expression: github.event_name == 'push' && startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: taiki-e/install-action@v2
with:
tool: just
- run: just ci-build-deps
- run: cargo publish --package ${{ matrix.crate }} ${{ matrix.extra_args }}