Minor bug fixes #226
This file contains hidden or 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 | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Env | |
| run: | | |
| sudo apt-get update -qqy | |
| sudo apt-get install -y libjpeg8-dev libbz2-dev | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Set up pyenvi and Python | |
| uses: "gabrielfalcao/pyenv-action@v18" | |
| with: | |
| default: 2.7.18 | |
| command: pyenv -v | |
| - name: Set up Env | |
| run: | | |
| sudo apt update -qq -y | |
| sudo apt install -qq -y gnupg2 | |
| gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | |
| curl -sSL https://get.rvm.io | bash -s stable | |
| source $HOME/.rvm/scripts/rvm | |
| # Puis Ruby 2.7.6 : | |
| rvm pkg install openssl | |
| rvm install ruby-2.7.6 --with-openssl-dir=$HOME/.rvm/usr | |
| # Pour voir la version de ruby installée : | |
| which ruby | |
| # Création d'un lien symbolique pour que docsplit puisse utiliser ruby (si pas de ruby système) : | |
| sudo ln -s $HOME/.rvm/rubies/ruby-2.7.6/bin/ruby /usr/bin/ruby2.7 | |
| sudo rm /usr/bin/ruby | |
| sudo ln -s ruby2.7 /usr/bin/ruby | |
| # Enfin, on peut installer les autres dépendances de documentviewer : | |
| gem install docsplit | |
| echo "$HOME/.rvm/gems/ruby-2.7.6/gems/docsplit-0.7.6/bin" >> $GITHUB_PATH | |
| sudo apt install -qq -y graphicsmagick wv poppler-utils libreoffice | |
| pip install -r requirements.txt coverage==5.3.1 | |
| - name: Cache eggs | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-eggs | |
| with: | |
| path: ~/buildout-cache/eggs | |
| key: ${{ runner.os }}-test-${{ env.cache-name }} | |
| restore-keys: ${{ runner.os }}-test-${{ env.cache-name }} | |
| - name: buildout | |
| run: | | |
| buildout -c ci.cfg annotate | |
| buildout -c ci.cfg | |
| - name: test | |
| run: | | |
| bin/test -t !robot | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Env | |
| run: | | |
| sudo apt-get update -qqy | |
| sudo apt-get install -y libjpeg8-dev libbz2-dev | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Set up pyenv and Python | |
| uses: "gabrielfalcao/pyenv-action@v18" | |
| with: | |
| default: 2.7.18 | |
| versions: 3.6.15 | |
| command: pyenv -v | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '2.6' | |
| - name: Setup Env | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -qqy graphicsmagick poppler-utils libreoffice | |
| gem install docsplit | |
| pip install -r requirements.txt coverage==5.3.1 | |
| - name: Cache eggs | |
| uses: actions/cache@v4 | |
| env: | |
| cache-name: cache-eggs | |
| with: | |
| path: ~/buildout-cache/eggs | |
| key: ${{ runner.os }}-coverage-${{ env.cache-name }} | |
| restore-keys: ${{ runner.os }}-coverage-${{ env.cache-name }} | |
| - name: buildout | |
| run: | | |
| buildout -c ci.cfg | |
| - name: code-analysis | |
| run: | | |
| bin/code-analysis | |
| - name: test coverage | |
| run: | | |
| bin/coverage run bin/test -t !robot | |
| - name: Install Coveralls | |
| run: | | |
| pyenv local 3.6 | |
| pip install -U pip setuptools --no-cache-dir | |
| pip install -U "coveralls>=3.0.0" coverage==5.3.1 --no-cache-dir | |
| - name: Publish to Coveralls | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| coveralls --service=github |