joey-obrien pushed code #40
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: Automated Building and Testing | |
run-name: ${{ github.actor }} pushed code | |
on: [push] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install tools to install package to runner | |
run: python -m pip install setuptools wheel | |
- run: cd ${{ github.workspace }} | |
- name: Create distribution files for package | |
run: python wildfire_evac/setup.py sdist -d wildfire_evac/dist | |
- name: Install package locally | |
run: pip install -e wildfire_evac | |
- name: Install pytest for testing | |
run: python -m pip install pytest pytest-cov | |
- name: Run tests | |
run: python -m pytest -s | |
- name: Generate code coverage file | |
run: python -m pytest --cov . | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |