Skip to content

Tests

Tests #491

Workflow file for this run

name: Tests
on:
push:
branches: [master]
pull_request:
schedule:
# 16:38 UTC on Tuesdays
- cron: "38 16 * * TUE"
repository_dispatch:
types: [tests]
env:
DOCKER_BUILDKIT: 1
jobs:
rust-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build on Rust NIGHTLY
# language: shell-script
run: |
docker build . --pull \
-f varia/Dockerfile.tests \
--target=cargo-build \
--build-arg=rust=nightly \
--tag=posixacl-nightly
- name: Test suite
run: docker run --rm posixacl-nightly cargo test --color=always
# Run sanitizer checks. Only allowed on Rust nightly. https://github.com/japaric/rust-san
# Cannot run sanitizers from Dockerfile, CAP_PTRACE is disallowed :(
# DISABLED TEMPORARILY due to https://github.com/rust-lang/rust/issues/111073
#- name: LeakSanitizer
# run: docker run --rm --env RUSTFLAGS="-Z sanitizer=leak" posixacl-nightly cargo test --color=always
- name: AddressSanitizer
# --tests to omit doc tests, doesn't play nice with AddressSanitizer
run: docker run --rm --env RUSTFLAGS="-Z sanitizer=address" posixacl-nightly cargo test --tests --color=always
rust-stable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build on Rust STABLE
run: |
docker build . --pull \
-f varia/Dockerfile.tests \
--target=cargo-build \
--build-arg=rust=stable \
--tag=posixacl-stable
- name: Test suite
run: docker run --rm posixacl-stable cargo test --color=always
- name: cargo check
run: docker run --rm posixacl-stable cargo check --color=always
- name: Clippy lints
run: docker run --rm posixacl-stable cargo clippy --color=always
- name: rustfmt
run: docker run --rm posixacl-stable cargo fmt -- --color=always --check
rust-msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build on Rust MSRV
run: |
docker build . --pull \
-f varia/Dockerfile.tests \
--target=cargo-build \
--build-arg=rust=msrv \
--tag=posixacl-msrv