add published garden #1021
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: tests | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "*" | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10"] | |
name: build | |
env: | |
GARDEN_API_CLIENT_ID: ${{ secrets.GARDEN_API_CLIENT_ID }} | |
GARDEN_API_CLIENT_SECRET: ${{ secrets.GARDEN_API_CLIENT_SECRET }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: 1.2.2 | |
- name: Install dependencies | |
run: | | |
poetry config virtualenvs.create false && \ | |
poetry install --no-interaction --no-ansi --with=test | |
- name: black lint | |
uses: psf/black@stable | |
with: | |
options: "--check --verbose --color --exclude 'fixtures'" | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are any-flake8 comments | |
flake8 | |
- name: Test with pytest | |
run: | | |
pytest -m "not integration" --cov=./ --cov-report=xml -r sx | |
- name: Perform Type Checking With mypy | |
run: | | |
mypy . | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
fail_ci_if_error: true | |
files: ./coverage.xml | |
- name: Check for vulnerable libraries with safety | |
run: | | |
safety check |