-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from AdamTheisen/workflow
ENH: Updating workflows
- Loading branch information
Showing
11 changed files
with
98 additions
and
31 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,14 @@ | ||
on: | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened, closed] | ||
|
||
jobs: | ||
gitavscan: | ||
runs-on: ubuntu-latest | ||
name: AV scan | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Git AV Scan | ||
uses: djdefi/gitavscan@main | ||
with: | ||
full: '--full' |
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 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 |
---|---|---|
@@ -1,14 +1,20 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
master | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
python-version: ["3.10"] | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/[email protected] | ||
|
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 |
---|---|---|
@@ -1,37 +1,57 @@ | ||
name: RadTRAQ | ||
name: Python Package using Conda | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened, closed] | ||
branches: [ main ] | ||
|
||
# Cancel concurrent runs | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
name: ${{ matrix.os }}-${{ matrix.python-version }} | ||
if: github.repository == 'ARM-Development/RadTraQ' | ||
runs-on: ${{ matrix.os }}-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
max-parallel: 4 | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.7] | ||
python-version: ["3.7", "3.8", "3.9"] | ||
os: [macOS, ubuntu, Windows] | ||
inlcude: | ||
- os: macos-latest | ||
PLAT: arm64 | ||
INTERFACE64: "" | ||
platform: [x64] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
sudo apt-get install libproj-dev proj-data proj-bin | ||
sudo apt-get install libgeos-dev | ||
pip install --upgrade cython numpy pyshp six | ||
pip install -r requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
pip install flake8 | ||
flake8 --max-line-length=115 --ignore=F401,E402,W504,W605,F403 | ||
- name: Test with pytest | ||
run: | | ||
python setup.py install | ||
pip install pytest | ||
pytest | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Conda Environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
environment-file: ./continuous_integration/environment_actions.yml | ||
activate-environment: radtraq_env | ||
auto-activate-base: False | ||
mamba-version: '*' | ||
use-mamba: true | ||
miniforge-variant: Mambaforge | ||
|
||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
# Switching back to original flake | ||
python -m flake8 --max-line-length=127 --ignore=F401,E402,W504,W605,F403 | ||
- name: Test with pytest | ||
run: | | ||
python -m pytest --mpl --cov=radtraq/ |
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 |
---|---|---|
|
@@ -104,3 +104,6 @@ venv.bak/ | |
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
#vim | ||
*.swp |
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,20 @@ | ||
# Basic environment for ACT. | ||
name: radtraq_env | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- numpy | ||
- scipy | ||
- xarray | ||
- matplotlib | ||
- cython | ||
- netcdf4 | ||
- act-atmos | ||
- pint | ||
- flake8 | ||
- pytest | ||
- pytest-cov | ||
- pytest-mpl | ||
- coveralls | ||
- pip |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.