This commit is contained in:
parent
f69617e40a
commit
4d22eade21
6 changed files with 87 additions and 133 deletions
|
|
@ -17,46 +17,53 @@ jobs:
|
|||
timeout-minutes: 20
|
||||
container:
|
||||
image: rust:slim
|
||||
env:
|
||||
RUSTUP_HOME: /rust/rustup
|
||||
CARGO_HOME: /rust/cargo
|
||||
steps:
|
||||
- name: Install action dependencies
|
||||
run: apt-get install --no-install-recommends --update -y nodejs curl git
|
||||
run: >
|
||||
apt-get install --no-install-recommends --update -y
|
||||
nodejs git nix
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-tags: true
|
||||
|
||||
- name: Set up Nix
|
||||
run: |
|
||||
{
|
||||
echo experimental-features = nix-command flakes
|
||||
} >> /etc/nix/nix.conf
|
||||
|
||||
- name: Set up Rust toolchain
|
||||
run: |
|
||||
rustup component add llvm-tools
|
||||
rustup component add --toolchain nightly rustfmt clippy
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
mkdir -p "$RUSTUP_HOME"
|
||||
mkdir -p "$CARGO_HOME"
|
||||
|
||||
- name: Set up additional tooling
|
||||
run: .forgejo/workflows/setup-tools.sh
|
||||
rust_version=$(
|
||||
grep '^rust-version = "' Cargo.toml \
|
||||
| cut -d '"' -f 2
|
||||
)
|
||||
|
||||
# rustup default "$rust_version"
|
||||
# rustup toolchain install nightly
|
||||
# rustup component add llvm-tools
|
||||
# rustup component add --toolchain nightly rustfmt clippy
|
||||
# rustup target add x86_64-unknown-linux-musl x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Set up CI user
|
||||
run: |
|
||||
useradd -m ci && chown -R ci:ci .
|
||||
git config --global --add safe.directory "$PWD"
|
||||
chown -R ci:ci "$RUSTUP_HOME"
|
||||
chown -R ci:ci "$CARGO_HOME"
|
||||
chown -R ci:ci "$PWD"
|
||||
printf '[safe]\ndirectory = %s\n' "$PWD" > /etc/gitconfig
|
||||
|
||||
- name: Text matches
|
||||
run: just ci todos-assess version-assess spell
|
||||
- name: Schema lint
|
||||
run: just ci schema-lint
|
||||
- name: Deny
|
||||
run: just ci deny
|
||||
- name: Format
|
||||
run: just ci format-assess
|
||||
- name: Lint
|
||||
run: just ci lint-assess
|
||||
- name: MSRV
|
||||
run: just ci msrv-assess
|
||||
- name: Cargo check
|
||||
run: just ci check
|
||||
- name: Test
|
||||
run: just ci test
|
||||
- name: Coverage
|
||||
run: just ci cover-assess
|
||||
- name: Set up Nix
|
||||
run: mkdir /nix && chown alice /nix
|
||||
|
||||
- name: Set up Nix development shell
|
||||
run: su ci -c "nix develop --command just smoke"
|
||||
- name: Assess
|
||||
run: su ci -c "nix develop --command just verify"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue