feat: init pytest workflow #5
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: Build And Test | |
on: | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- .github/workflows/aws-preview.yml | |
- server/** | |
- petercat_utils/** | |
- subscriber/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: production | |
strategy: | |
fail-fast: true | |
defaults: | |
run: | |
working-directory: ./server | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Lint with Ruff | |
run: | | |
pip install ruff | |
ruff check --output-format=github . | |
- name: Test with pytest | |
run: | | |
pip install pytest pytest-cov | |
pytest |