hackforla / hackforla/peopledepot
Add testing to continous integration (CI)
- Dominant language
- Python
- Stars
- 14
- Forks
- 37
- Avg merge
- 9d 15h
- Merged PRs (30d)
- 5
Description
### Dependency
- [ ] A working version of PeopleDepot - see [comment below](https://github.com/hackforla/peopledepot/issues/344#issuecomment-2207408717)
### Overview
We need to run pytest in continuous integration (CI) so that we know PRs aren't broken.
### Action Items
- [ ] Add a GitHub Action (GHA) workflow to check out the code and run tests
- [ ] Add a step to call the check migration management command from #348
- [ ] Remove test step from pre-commit config
### Resources/Instructions
Maybe something like this
- but this doesn't actually run the tests that it's supposed to. It needs debugging.
```yml
name: Run all tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: cd app/ || pip3 install -r requirements.txt
- name: Execute tests
run: cd app/ || python3 -m pytest -v
```
Contributor guide
Assessment
This issue has not been assessed yet.