Skip to content

Commit

Permalink
Github workflow tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrondel committed Jul 24, 2024
1 parent 26cfb50 commit a44be92
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Check Python formatting

on:
push:
branches:
- main
pull_request:

jobs:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/formatting.yaml@main
22 changes: 8 additions & 14 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
name: lint

on:
- push
- pull_request
push:
branches:
- main
pull_request:

jobs:
lint:
call-workflow:
uses: lsst/rubin_workflows/.github/workflows/lint.yaml@main
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install
run: pip install -r <(curl https://raw.githubusercontent.com/lsst/linting/main/requirements.txt)

- name: Run linter
run: flake8
- uses: chartboost/ruff-action@v1
23 changes: 10 additions & 13 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@

name: Run PyTest

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:

jobs:
run_pytest:
Expand All @@ -27,15 +31,8 @@ jobs:
run: |
pytest --cov=./ --cov-report=html --html=pytest_report.html --self-contained-html
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: pytest_report
path: pytest_report.html

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage_report
path: htmlcov

- name: Upload coverage to codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit a44be92

Please sign in to comment.