Skip to content

Upgrade to Python 3.10 and latest version of lxml 4 #890

Upgrade to Python 3.10 and latest version of lxml 4

Upgrade to Python 3.10 and latest version of lxml 4 #890

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
services:
postgres:
# 12 is chosen because that matches the version on the live server
image: postgres:12
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432/tcp
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/cache@v2
name: Cache dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements_dev.txt
- name: Run tests
run: nosetests iati_datastore --with-coverage --cover-package iati_datastore/iatilib
env:
TEST_SQLALCHEMY_DATABASE_URI: postgresql://postgres:postgres@localhost:5432/postgres
- name: Coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
name: Deploy
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install fabric
run: pip install fabric==2.5.0
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa
known_hosts: ${{ secrets.SSH_HOSTNAME }}
config: |
Host datastore
HostName ${{ secrets.SSH_HOSTNAME }}
User ${{ secrets.SSH_USER }}
IdentityFile ~/.ssh/id_rsa
- name: Deploy
run: fab deploy -H datastore