chore: update pre-commit hooks #688
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: Unit Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
- dev | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10"] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Record State | |
run: | | |
pwd | |
echo github.ref is: ${{ github.ref }} | |
echo GITHUB_SHA is: $GITHUB_SHA | |
echo github.event_name is: ${{ github.event_name }} | |
pip --version | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
pip install wheel | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
shell: bash | |
- name: Install AstroPhot | |
run: | | |
cd $GITHUB_WORKSPACE/ | |
pip install . | |
pip show astrophot | |
shell: bash | |
- name: Test with pytest | |
run: | | |
cd $GITHUB_WORKSPACE/tests/ | |
pwd | |
pytest | |
shell: bash |