From 6759667095c9a5e722560db89bf104f4585953c8 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 3 Aug 2023 09:40:51 +0100 Subject: [PATCH] CI: Add documentation build and lint jobs --- .github/workflows/pull-request.yml | 16 ++++++++++++++++ Makefile | 12 ++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 623a06f..8d6129f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -14,6 +14,22 @@ jobs: - name: Build run: make build + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build documentation + run: make docs + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Lint + run: make lint test: runs-on: ubuntu-latest steps: diff --git a/Makefile b/Makefile index 6d16776..8da4d4b 100644 --- a/Makefile +++ b/Makefile @@ -2,12 +2,20 @@ build: @docker buildx build -t reductionist . +.PHONY: docs +docs: + @docker buildx build --build-arg PROFILE=dev --target builder -t reductionist-test . + @docker run --rm -e RUSTDOCFLAGS="-D warnings" reductionist-test cargo doc --no-deps + +.PHONY: lint +lint: + @docker buildx build --build-arg PROFILE=dev --target builder -t reductionist-test . + @docker run --rm reductionist-test cargo check --color always + .PHONY: test test: @docker buildx build --build-arg PROFILE=dev --target builder -t reductionist-test . - @docker run --rm reductionist-test cargo check --color always @docker run --rm reductionist-test cargo test --color always - @docker run --rm reductionist-test cargo bench --color always .PHONY: run run: