Merge pull request #103 from intermine/dependabot/pip/urllib3-2.6.3 #44
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
| name: InterMine WS Python CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| # Label used to access the service container | |
| postgres: | |
| image: postgres:14 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '11' | |
| - name: Set up python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Change apt mirror | |
| run: | | |
| set -euo pipefail | |
| # azure.archive.ubuntu.com is flaky | |
| sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list | |
| sudo apt-get update -o APT::Update::Error-Mode=any | |
| - name: Install dependencies | |
| run: | | |
| set -euo pipefail | |
| sudo apt-get install libxml2-dev libxslt-dev python3-dev | |
| python -m pip install --upgrade pip | |
| pip install -U setuptools | |
| pip install -r requirements.txt | |
| - name: Install PostgreSQL client | |
| run: | | |
| set -euo pipefail | |
| sudo apt-get update -y | |
| sudo apt-get install -y libpq-dev postgresql-client | |
| sudo service postgresql start | |
| - name: Run unit tests | |
| run: | | |
| set -euo pipefail | |
| ./config/ci/init-solr.sh ${GITHUB_WORKSPACE} | |
| ./config/ci/init.sh ${GITHUB_WORKSPACE} http://localhost:8080/intermine-demo | |
| python setup.py test | |
| python setup.py livetest |