Skip to content

update deploy.sh

update deploy.sh #457

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI-Ubuntu
# 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: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
# unsupported version on ubuntu-latest 3.5, 3.6
# see https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md
# 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 dependences
run: |
python -m pip install --upgrade pip
# install ubuntu package
sudo apt-get update
# need to add ghostscript explicitly (only 'recommanded' by imagemagick package)
# but 'libmagickwand-dev' is installed
sudo apt-get install ghostscript imagemagick
# move policy file
sudo mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.off
# texlive-fonts-recommended (bophook in texlive-latex-extra) required by moodle2amc test
sudo apt-get install texlive-latex-recommended texlive-pictures texlive-fonts-recommended texlive-latex-extra
# add libtext-unidecode-perl to fix bug in deb package : https://github.com/brucemiller/LaTeXML/issues/1022
sudo apt-get install libtext-unidecode-perl
sudo apt-get install latexml
sudo apt-get install xmlindent
- name: Test latexml
run: |
# add --strict flag to be more strict in error catching
latexml --noparse --nocomment --strict --path=./amc2moodle/amc2moodle --dest=./out.xml ./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 temprorary 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
# - name: Archive .
# if: ${{ always() }}
# uses: actions/upload-artifact@v1
# with:
# name: all_${{ matrix.python-version }}
# path: .