Skip to content

Commit

Permalink
Add CI using pytest.
Browse files Browse the repository at this point in the history
- Add the data files to make pytest run
- Remove the large file restrictions so that the data files (35M!) don't
  break pre-commit. This isn't ideal, but it's better than pulling
  them from elsewhere.
- Remove the windows-specific python stuff from requirements.txt
- Add a github workflow to set up everything and run pytest
  • Loading branch information
ekr-cfa committed Jan 18, 2024
1 parent 991817e commit b8e7183
Show file tree
Hide file tree
Showing 8 changed files with 380,102 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run Pytest

on:
push:


jobs:
pytest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip3 install -r requirements.txt
- run: git clone https://github.com/cdcent/cfa-scenarios-data
- run: rm -rf data
- run: mv cfa-scenarios-data/data .
- run: pytest
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
Expand Down Expand Up @@ -55,5 +54,5 @@ repos:
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
args: ['--baseline', '.secrets.baseline', '--exclude-files', '.*\.csv']
exclude: package.lock.json
Loading

0 comments on commit b8e7183

Please sign in to comment.