diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..bcb79c7 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,39 @@ +name: Run tests + +env: + TEMPLATEDIR: $HOME/.texlive/texmf-local/tex/latex/latex-template + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + - name: Install dependencies + run: | + sudo apt-get install imagemagick librsvg2-bin + pip install Pygments + - name: Install LaTeX + run: | + ./scripts/install_font.sh + ./scripts/install_texlive.sh + - name: Test Lua + run: | + export PATH=$HOME/.texlive/bin/x86_64-linux:$PATH + cd tests + make lua-test + - name: Test LaTeX + run: | + export PATH=$HOME/.texlive/bin/x86_64-linux:$PATH + mkdir -p ${TEMPLATEDIR} && cp -r . ${TEMPLATEDIR} && texhash + make tests diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e89e362..0000000 --- a/.travis.yml +++ /dev/null @@ -1,45 +0,0 @@ -# Copied from Zeste de Savoir, -# https://github.com/zestedesavoir/zds-site/blob/a16c5fc932b361cbee5c6e61b24167605e24cd8b/.travis.yml - -dist: trusty - -language: python - -python: - - 2.7 - -git: - depth: 1 - -cache: - apt: true - directories: - - $HOME/.texlive - -addons: - apt: - packages: - - imagemagick - - librsvg2-bin - -install: - - ./scripts/install_font.sh - - ./scripts/install_texlive.sh - - export PATH=$HOME/.texlive/bin/x86_64-linux:$PATH - - pip install Pygments - -script: - - CURR=$(pwd) - - cd tests/ # run lua test first, otherwise it will not find zmdocument.lua - - make lua-test - - cd .. - - TEMPLATEDIR=$HOME/.texlive/texmf-local/tex/latex/latex-template - - TESTDIR=/tmp/latex-template-test - - mkdir -p $TEMPLATEDIR && cp -r . $TEMPLATEDIR && texhash - - mkdir -p $TESTDIR && cp -r ./tests/* $TESTDIR - - cd $TESTDIR - - patch Makefile < travis.patch # no cheating - - make tests - - cd $CURR - - rm -Rf $TESTDIR && rm -Rf $TEMPLATEDIR # avoid the package to be cached! - - texhash # avoid weird stuffs diff --git a/tobi.txt b/tobi.txt deleted file mode 100644 index 348a616..0000000 --- a/tobi.txt +++ /dev/null @@ -1,5 +0,0 @@ - a - - b - c - \href{pokemon}