Merge pull request #19 from StacklokLabs/multi-providers #71
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: Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
curl -sSL https://install.python-poetry.org | python3 - | |
- name: Configure Poetry | |
run: | | |
poetry config virtualenvs.create true | |
poetry config virtualenvs.in-project true | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: ./.venv | |
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: poetry install --with dev | |
- name: Run code formatting | |
run: poetry run make format | |
- name: Run linting | |
run: poetry run make lint | |
- name: Run tests | |
run: poetry run make test | |
- name: Run security checks | |
run: poetry run make security | |
- name: Run build | |
run: poetry run make build |