Update GHA ubuntu image to include python 2.7 #1213
Workflow file for this run
This file contains 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: "Lint and Unit Tests" | |
on: | |
push: | |
branches: [main, ] | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [main] | |
jobs: | |
build: | |
name: ${{ matrix.travis_job }} | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres:10.8 | |
env: | |
POSTGRES_USER: testuser | |
POSTGRES_PASSWORD: testpassword | |
POSTGRES_DB: test_django | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
strategy: | |
matrix: | |
python-version: [2.7] | |
travis_job: ["lint", "test"] | |
env: | |
DJANGO_SETTINGS_MODULE: esp.settings | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: niden/actions-memcached@v7 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: MatteoH2O1999/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Prepare for Installing Dependencies | |
run: deploy/travis/before_install | |
- name: Install Dependencies for ${{ matrix.travis_job }} | |
env: | |
TRAVIS_JOB: ${{ matrix.travis_job }} | |
run: deploy/travis/install | |
- name: Prepare for ${{ matrix.travis_job }} | |
env: | |
TRAVIS_JOB: ${{ matrix.travis_job }} | |
run: deploy/travis/before_script | |
- name: Run ${{ matrix.travis_job }} | |
env: | |
TRAVIS_JOB: ${{ matrix.travis_job }} | |
run: deploy/travis/script | |
- name: Upload Coverage to Codecov | |
if: ${{ matrix.travis_job == 'test' }} | |
uses: codecov/codecov-action@v2 | |
with: | |
fail_ci_if_error: true | |
verbose: true |