Skip to content

EAR-2598 - Publish ABS form types - Survey ID 202 - Part 4 #2122

EAR-2598 - Publish ABS form types - Survey ID 202 - Part 4

EAR-2598 - Publish ABS form types - Survey ID 202 - Part 4 #2122

Workflow file for this run

name: PR
on:
pull_request:
branches:
- main
jobs:
lint:
permissions:
contents: read
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: |
echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/.virtualenvs
- name: Cache Poetry virtualenv
uses: actions/cache@v4
id: cache-virtualenv
with:
path: ~/.virtualenvs
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-virtualenvs-${{ hashFiles('poetry.lock') }}
- name: Install virtual environment
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
run: poetry install
- name: Lint Python
run: make lint
validate-schemas:
permissions:
contents: read
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: |
echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/.virtualenvs
- name: Cache Poetry virtualenv
uses: actions/cache@v4
id: cache-virtualenv
with:
path: ~/.virtualenvs
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-virtualenvs-${{ hashFiles('poetry.lock') }}
- name: Install virtual environment
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
run: poetry install
- uses: actions/checkout@v4
- name: Spin up validator
run: make run-validator
- name: Validate schemas
run: make validate-schemas
test-translation-templates:
permissions:
contents: read
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: |
echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: ~/.virtualenvs
- name: Cache Poetry virtualenv
uses: actions/cache@v4
id: cache-virtualenv
with:
path: ~/.virtualenvs
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-virtualenvs-${{ hashFiles('poetry.lock') }}
- name: Install virtual environment
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
run: poetry install
- name: Test translation templates
run: make test-translation-templates