Test #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
- push | |
- workflow_dispatch | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Setup TeX Live | |
id: setup_texlive | |
uses: teatimeguest/setup-texlive-action@v2.6.2 | |
with: | |
packages: scheme-basic fancyvrb xcolor | |
- name: Create test source file | |
shell: bash | |
run: echo "Hello world" > source.txt | |
- name: Install code-to-pdf | |
shell: bash | |
run: pip install . | |
- name: Build PDF | |
shell: bash | |
run: code-to-pdf --style github-dark source.txt output.pdf | |
- name: Check if the PDF file exists | |
uses: andstor/file-existence-action@v2.0.0 | |
with: | |
fail: true | |
files: 'output.pdf' | |
- name: Check if the file is a valid PDF | |
shell: bash | |
run: '[[ "$(cat output.pdf)" = "%PDF"* ]]' | |
- name: Upload the PDF file as an artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: output | |
path: 'output.pdf' |