From 5e45390a87a5b4a066cff94dfe686aa688cf5e19 Mon Sep 17 00:00:00 2001 From: Joe bellus Date: Mon, 10 Mar 2025 21:54:34 -0400 Subject: [PATCH] Added test CI action --- .github/workflows/publish.yaml | 5 ++++- .github/workflows/test.yaml | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a02c891..8ba16e1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,6 +1,9 @@ name: Publish PDF -on: push +on: + push: + branches: + - main jobs: publish: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..5f5dee3 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,25 @@ +name: Test PDF + +on: push + +jobs: + compile: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + - name: Setup tectonic + run: | + apt -y install curl + curl --proto '=https' --tlsv1.2 -fsSL https://drop-sh.fullyjustified.net |sh + - name: Restore cache + id: cache-restore + uses: actions/cache/restore@v4 + with: + path: ~/.cache/Tectonic + key: ${{ runner.os }}-tectonic- + - name: Compile latex + run: ./tectonic book.tex