Skip to content

Commit

Permalink
Add api spec test action (#49)
Browse files Browse the repository at this point in the history
This test is not blocking, but run automatically so developers can track api status updates
  • Loading branch information
HunterGerlach authored Sep 27, 2023
1 parent 6b4573f commit 89201dd
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/api-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: API Spec Test

on:
pull_request:
paths:
- "src/**"
- ".github/workflows/**"
- "Makefile"
- "pyproject.toml"
- "poetry.lock"
push:
branches:
- main

env:
POETRY_VERSION: "1.6.1"
WORKDIR: ${{ inputs.working-directory == '' && '.' || inputs.working-directory }}

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"] # Support starts at v3.9
fail-fast: false

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: lint-with-extras

- name: Check Poetry File
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
poetry check
- name: Check lock file
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
poetry lock --check
- name: Install dependencies
working-directory: ${{ inputs.working-directory }}
run: |
poetry install
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV

- name: Run API Spec Test
run: make test-api

0 comments on commit 89201dd

Please sign in to comment.