change for testing building #512
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
# 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, 3.9, "3.10", "3.11", "3.12", "3.13"] | |
env: | |
# set env variable for Wand | |
MAGICK_HOME: "/opt/homebrew" | |
# 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@main | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@main | |
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 --verify-repo=none 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/tests/payload_test_amc2moodle/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.tests.test_amc2moodle | |
- name: Test moodle2amc | |
run: | | |
# add automultiplechoice.sty local copy to LaTeX PATH (for this step) | |
# export TEXINPUTS=.:./tests/payload_test_amc2moodle/:$TEXINPUTS (during tests, automultiplechoice.sty is copied in the temporary test folder ) | |
python -m amc2moodle.tests.test_moodle2amc | |
- name: Test text parser | |
run: | | |
python -m amc2moodle.tests.test_utils_text | |
- name: Test calculated questions parsers | |
run: | | |
python -m amc2moodle.tests.test_utils_calculatedParser | |
# Store output files | |
# amc2moodle | |
- name: Archive XML test output of amc2moodle (without tikz) | |
if: ${{ always() }} | |
uses: actions/upload-artifact@main | |
with: | |
name: test_notikz_${{ matrix.python-version }} | |
path: output_tests/test_notikz.xml | |
- name: Archive XML test output of amc2moodle (with tikz) | |
if: ${{ always() }} | |
uses: actions/upload-artifact@main | |
with: | |
name: test_tikz_${{ matrix.python-version }} | |
path: output_tests/test_tikz.xml | |
# moodle2amc | |
- name: Move latex output | |
if: ${{ always() }} | |
run: | | |
mkdir moodle-bank-exemple-output | |
mv output_tests/test_moodle-bank-exemple.* moodle-bank-exemple-output/ | |
- name: Archive LaTeX test output (moodle2amc) | |
if: ${{ always() }} | |
uses: actions/upload-artifact@main | |
with: | |
name: test_moodle-bank-exemple_${{ matrix.python-version }} | |
path: moodle-bank-exemple-output |