fix: use --system env #723
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 workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| # This workflow will run lint and unit tests for the python flask server on every push. | |
| name: Server CI | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| test: | |
| defaults: | |
| run: | |
| working-directory: server | |
| runs-on: ubuntu-latest | |
| # Service containers to run with `container-job` | |
| services: | |
| # Label used to access the service container | |
| redis: | |
| # Docker Hub image | |
| image: redis | |
| # Set health checks to wait until redis has started | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps port 6379 on service container to the host | |
| - 6379:6379 | |
| steps: | |
| # set up gfortran for camb | |
| - uses: actions/checkout@v2 | |
| - name: Setup gfortran | |
| run: | | |
| sudo apt-get install gfortran-12 | |
| mkdir -p gfortran-symlinks | |
| ln -s /usr/bin/gfortran-12 gfortran-symlinks/gfortran | |
| export PATH=$PWD/gfortran-symlinks:$PATH | |
| - name: Set up Python 3.9.16 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.9.16 | |
| - name: Python Caching | |
| uses: actions/cache@v2 | |
| with: | |
| path: ${{ env.pythonLocation }} | |
| # Makes the hashing depend on changes to requirements.txt and python version | |
| key: ${{ runner.os }}${{ env.pythonLocation }}${{ hashFiles('server/requirements.txt') }}-py3.9.5 | |
| - name: Install Dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| sh run.sh --install | |
| - name: Lint | |
| run: sh run.sh --lint | |
| - name: Test | |
| run: sh run.sh --test |