Skip to content

Update workflow to install all optional dependencies #78

Update workflow to install all optional dependencies

Update workflow to install all optional dependencies #78

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
lint:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install '.[all]'
pip install '.[lint]'
- name: black
run: |
black . --check
- name: ruff
run: |
ruff check .
- name: mypy
run: |
mypy pyfredapi
test:
name: Run pytest
runs-on: ubuntu-latest
env:
FRED_API_KEY: ${{ secrets.FRED_API_KEY }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install '.[test]'
- name: Test with pytest
run: |
pytest tests/ --record-mode=none --no-header -vv