[FIX] add push triger to main branch of doc building #14
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: CI | |
on: | |
push: | |
branches: [main, develop, release/*] | |
pull_request: | |
branches: [main, develop, release/*] | |
jobs: | |
full-install-CI: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: pyrosys | |
auto-activate-base: false | |
- name: Build | |
shell: bash -el {0} | |
env: | |
WORKSPACE: ${{ github.workspace }} | |
run: | | |
.ci/autosetup.sh | |
- name: Run Ruff Check | |
shell: bash -el {0} | |
run: | | |
mkdir -p reports | |
ruff check src --fix --output-format=junit --output-file=reports/ruff-lint.xml | |
- name: Publish Ruff Results | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
with: | |
name: Ruff Tests | |
path: reports/ruff-lint.xml | |
reporter: java-junit | |
- name: Run Ruff Format | |
shell: bash -el {0} | |
run: | | |
ruff format . --diff | |
- name: Run Mypy | |
continue-on-error: true | |
shell: bash -el {0} | |
run: | | |
mkdir -p reports | |
mypy src tests > reports/mypy.log | |
- name: Upload Mypy Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mypy-results | |
path: reports/mypy.log | |
- name: Run Tests | |
shell: bash -el {0} | |
run: | | |
mkdir -p reports | |
pytest --junit-xml=reports/unittest.xml ./tests | |
- name: Publish Test Results | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() | |
with: | |
name: Pytest Tests | |
path: reports/unittest.xml | |
reporter: java-junit |