-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github actions for syntax testing
- Loading branch information
1 parent
4ed9be8
commit f8c54de
Showing
3 changed files
with
53 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: YAPF Google chromium style | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
ci: | ||
name: "CI setup" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- 3.9 | ||
os: | ||
- "ubuntu-latest" | ||
|
||
runs-on: "${{ matrix.os }}" | ||
|
||
# use bash everywhere | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
environment-name: Zooniverse | ||
environment-file: Zooniverse/dev_environment.yml | ||
python-version: "${{ matrix.python-version }}" | ||
cache-env: true | ||
cache-downloads: true | ||
|
||
- name: "Run tests" | ||
run: | | ||
yapf -d --recursive ./Zooniverse/ --style=.style.yapf 2>&1 |
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,4 @@ | ||
[style] | ||
# YAPF uses the chromium style | ||
based_on_style = google | ||
COLUMN_LIMIT=120 |
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,9 @@ | ||
name: Zooniverse | ||
channels: [conda-forge] | ||
dependencies: | ||
- python | ||
- yapf | ||
- black | ||
- pytest-cov | ||
- pytest-xdist | ||
- pdoc |