diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 00000000..27f34a6b --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -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 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 3733b421..59bae3f1 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -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 diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 80bc7694..ae2b3ee8 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -3,7 +3,11 @@ name: Run PyTest -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: jobs: run_pytest: @@ -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 }}