Skip to content

Commit

Permalink
Merge pull request #41 from AdamTheisen/workflow
Browse files Browse the repository at this point in the history
ENH: Updating workflows
  • Loading branch information
AdamTheisen authored Oct 28, 2022
2 parents f0799b2 + d885a65 commit 1c5fe94
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 31 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/antivirus.yml
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'
8 changes: 6 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]
schedule:
- cron: '37 14 * * 4'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/documentation.yml
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]
Expand Down
74 changes: 47 additions & 27 deletions .github/workflows/pythonpackage.yml
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/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ venv.bak/

# mypy
.mypy_cache/

#vim
*.swp
20 changes: 20 additions & 0 deletions continuous_integration/environment_actions.yml
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 removed radtraq/tests/baseline/test_cfad.png
Binary file not shown.
Binary file modified radtraq/tests/baseline/test_cloud_mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified radtraq/tests/baseline/test_corner_reflector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added radtraq/tests/baseline/test_plotting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified radtraq/tests/baseline/test_self_consistency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1c5fe94

Please sign in to comment.