Skip to content

Commit

Permalink
Simplify test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Nov 6, 2024
1 parent c82ed81 commit d855b69
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,6 @@ on:
pull_request:

jobs:
scripts_and_manage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Test scripts
- run: |
curl -fsSL -o ./shfmt https://github.com/mvdan/sh/releases/download/v3.6.0/shfmt_v3.6.0_linux_amd64
chmod 700 ./shfmt
- run: ./shfmt -i 4 -l -d scripts/*
- run: shellcheck -S style -o all scripts/*
# Test manpage
- uses: docker://asciidoctor/docker-asciidoctor
with:
args: asciidoctor -b manpage -a reproducible --warnings mdcat.1.adoc
- run: man -l --warnings=w --pager=cat mdcat.1
env:
MANWIDTH: 80

# See https://mozilla.github.io/cargo-vet/configuring-ci.html
cargo-vet:
runs-on: ubuntu-latest
Expand All @@ -55,20 +37,41 @@ jobs:
- name: Invoke cargo-vet
run: cargo vet --locked

# Check dependency policies
deny:
# Lint things which are independent from the build target
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Scripts
- uses: docker://mvdan/shfmt
with:
args: -i 4 -l -d scripts/combine-screenshots scripts/package scripts/screenshot-windows
- uses: docker://koalaman/shellcheck:stable
with:
args: -S style -o all scripts/combine-screenshots scripts/package scripts/screenshot-windows

- uses: dtolnay/rust-toolchain@stable
# Check our library without any features
with:
components: rustfmt

# Test formatting
- run: cargo fmt --all -- --check

# Dependency policies
- uses: EmbarkStudios/cargo-deny-action@v2
- uses: EmbarkStudios/cargo-deny-action@v2
with:
arguments: "--no-default-features"
manifest-path: "./pulldown-cmark-mdcat/Cargo.toml"
# Test mdcat in its default configuration (this implicitly checks the
# default configuration of our libraries)
- uses: EmbarkStudios/cargo-deny-action@v2

# Manpage
- uses: docker://asciidoctor/docker-asciidoctor
with:
args: asciidoctor -b manpage -a reproducible --warnings mdcat.1.adoc
- run: man -l --warnings=w --pager=cat mdcat.1
env:
MANWIDTH: 80

# Test mdcat itself
test:
Expand All @@ -94,10 +97,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
components: clippy,rustfmt

# Test formatting
- run: cargo fmt --all -- --check
components: clippy

# Since Windows builds are comparatively slow, we skip quite a few builds on Windows to speed up pipelines

Expand Down

0 comments on commit d855b69

Please sign in to comment.