-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable github actions for PRs on all branches
Major changes - update github actions to run building and type check actions for PRs on **all branches** - separate actions for building and sonarcloud - delete unused github action documentation.yml
- Loading branch information
1 parent
a892925
commit 28ae40b
Showing
5 changed files
with
66 additions
and
81 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Check format and coverage, then upload to SonarCloud | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- bin/** | ||
- src/** | ||
- tests/** | ||
- setup.py | ||
- .github/workflows/build.yml | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- bin/** | ||
- src/** | ||
- tests/** | ||
- setup.py | ||
- .github/workflows/build.yml | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
jobs: | ||
|
||
sonarcloud: | ||
name: SonarCloud | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
- name: Python info | ||
shell: bash -l {0} | ||
run: | | ||
which python3 | ||
python3 --version | ||
- name: Upgrade pip and setuptools | ||
run: | | ||
python3 -m pip install --upgrade pip setuptools wheel | ||
- name: Install nplinker and its dependencies | ||
run: | | ||
python3 -m pip install .[dev] | ||
install-nplinker-deps --run-on-github | ||
- name: Check style against standards using ruff | ||
run: ruff check . | ||
- name: Run unit tests with coverage | ||
run: pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml tests/unit | ||
- name: Correct coverage paths | ||
run: sed -i "s+$PWD/++g" coverage.xml | ||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{secrets.SONAR_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,6 @@ on: | |
- src/** | ||
- tests/** | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- src/** | ||
- tests/** | ||
|
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