Skip to content

Fix LaTeXML 0.8.8 breaking changes. #420

Fix LaTeXML 0.8.8 breaking changes.

Fix LaTeXML 0.8.8 breaking changes. #420

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI-mac-os
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ '*' ]
paths-ignore: # Don't trigger on files that are updated by the CI
- README.md
pull_request:
branches: [ '*' ]
schedule:
# * is a special character in YAML so you have to quote this string
# run at 02:01 on every 15th day-of-month.
- cron: '1 2 */15 * *'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
runs-on: macos-latest
strategy:
matrix:
python-version: [3.8]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.1.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install the LaTeXML dependences
run: |
python -m pip install --upgrade pip
# Install requirements for lateXML
brew update
brew install imagemagick
brew install --cask basictex
brew install latexml
- name: Update $PATH
# run: echo ::add-path::/Library/TeX/texbin # depreciated
run: echo "/Library/TeX/texbin" >> $GITHUB_PATH
- name: Add fonts (required by moodle2amc tests)
run: |
# xstring is just required for testing --includestyles
sudo tlmgr update --self
sudo tlmgr install collection-fontsrecommended bophook xstring
- name: Test latexml
run: |
# add --strict flag to be more strict in error catching
latexml --noparse --nocomment --strict --path=./amc2moodle/amc2moodle --dest=./out.xml ./amc2moodle/amc2moodle/test/QCM.tex
- name: Install amc2moodle
run: |
# add -e to have write access for test. TODO : change with temp file
pip install -e .
- name: Test amc2moodle
run: |
python -m amc2moodle.amc2moodle.test
- name: Test moodle2amc
run: |
# add automultiplechoice.sty local copy to LaTeX PATH (for this step)
export TEXINPUTS=.:./amc2moodle/moodle2amc/test:$TEXINPUTS
python -m amc2moodle.moodle2amc.test
- name: Test calculated questions parsers
run: |
python -m amc2moodle.utils.test
# Store output files
# amc2moodle
- name: Archive XML test output of amc2moodle (without tikz)
if: ${{ always() }}
uses: actions/upload-artifact@v1
with:
name: test_notikz_${{ matrix.python-version }}
path: test_notikz.xml
- name: Archive XML test output of amc2moodle (with tikz)
if: ${{ always() }}
uses: actions/upload-artifact@v1
with:
name: test_tikz_${{ matrix.python-version }}
path: test_tikz.xml
# moodle2amc
- name: Move latex output
if: ${{ always() }}
run: |
mkdir moodle-bank-exemple-output
mv test_moodle-bank-exemple.* moodle-bank-exemple-output/
- name: Archive LaTeX test output (moodle2amc)
if: ${{ always() }}
uses: actions/upload-artifact@v1
with:
name: test_moodle-bank-exemple_${{ matrix.python-version }}
path: moodle-bank-exemple-output