Skip to content

feat: ID update tests to support updated ID service responses #255

feat: ID update tests to support updated ID service responses

feat: ID update tests to support updated ID service responses #255

Workflow file for this run

name: PR
on:
pull_request:
branches:
- main
env:
PACT_BROKER_BASE_URL: ${{ secrets.PACT_BROKER_BASE_URL }}
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }}
GIT_COMMIT: ${{ github.sha }}
GIT_BRANCH: ${{ github.head_ref }}
jobs:
lint:
name: Lint Code
runs-on: ubuntu-20.04
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10.4
architecture: x64
- name: Install nox
run: |
pipx install poetry
pipx install nox
pipx inject nox nox-poetry
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Run linting
run: nox --session=lint
test:
env:
ALLURE_RESULTS: allure-results
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
name: Test Code
runs-on: ubuntu-20.04
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.9.21
architecture: x64
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10.16
architecture: x64
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11.11
architecture: x64
- name: Install allurectl
uses: allure-framework/setup-allurectl@v1
with:
allure-endpoint: ${{ secrets.ALLURE_ENDPOINT }}
allure-token: ${{ secrets.ALLURE_TOKEN }}
allure-project-id: 34
- name: Install nox
run: |
pipx install poetry
pipx install nox
pipx inject nox nox-poetry
- name: Run tests
id: test
run: allurectl watch -- nox --session=tests
- name: Build package wheel
run: poetry build
- name: Publish pact
run: make -f pact.mk publish_pacts
- name: get allure_run_id
if: always()
run: |
export ALLURE_LAUNCH_ID=$(allurectl job-run env | grep 'ALLURE_LAUNCH_ID' | cut -d '=' -f 2)
echo ALLURE_LAUNCH_ID=$ALLURE_LAUNCH_ID >> $GITHUB_ENV
can-i-deploy:
name: Check compatibility with SatVu APIs
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- run: docker pull pactfoundation/pact-cli:latest
- name: Check compatibility with SatVu APIs on QA env
env:
ENVIRONMENT: qa
run: make -f pact.mk can_i_deploy
- name: Check compatibility with SatVu APIs on production env
if: always()
env:
ENVIRONMENT: production
run: make -f pact.mk can_i_deploy