Skip to content

Tests

Tests #373

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@v3
- name: Build on Rust NIGHTLY
# language: shell-script
run: |
docker build . --pull \
-f varia/Dockerfile.tests \
--target=cargo-build \
--build-arg=channel=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 :(
- 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@v3
- name: Build on Rust STABLE
run: |
docker build . --pull \
-f varia/Dockerfile.tests \
--target=cargo-build \
--build-arg=channel=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