Skip to content

Commit

Permalink
👷 Run all tests only on PR, 1 otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
Baharis committed Oct 16, 2024
1 parent 753d166 commit da8af3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/actions/tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@ runs:
steps:
- name: Check-out repository
uses: actions/checkout@v4
shell: bash

- name: Set up Python
uses: actions/setup-python@v5
shell: bash
with:
python-version: ${{ inputs.python-version }}

- name: Install poetry
uses: snok/install-poetry@v1
shell: bash

- name: Install package
shell: bash
run: poetry install --with dev

- name: Lint with flake8
shell: bash
run: |
# stop the build if there are Python syntax errors or undefined names
echo "Linting errors in picometer/tests:"
Expand All @@ -32,12 +37,14 @@ runs:
- name: Use Codecov to track coverage
uses: codecov/codecov-action@v4
shell: bash
if: ${{ inputs.representative }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml # coverage report

- name: Build documentation
shell: bash
run: poetry run make html --directory docs/
if: ${{ inputs.representative }}

0 comments on commit da8af3b

Please sign in to comment.