-
Notifications
You must be signed in to change notification settings - Fork 39
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 #781 from PCMDI/776_ljw_workflow
Remove ymal files to start from scratch
- Loading branch information
Showing
17 changed files
with
82 additions
and
1,426 deletions.
There are no files selected for viewing
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,82 @@ | ||
name: CI/CD Build Workflow | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
pull_request: | ||
branches: [master] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
check-jobs-to-skip: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should_skip: ${{ steps.skip_check.outputs.should_skip }} | ||
steps: | ||
- id: skip_check | ||
uses: fkirc/skip-duplicate-actions@master | ||
with: | ||
cancel_others: true | ||
paths_ignore: '["**/README.rst", "**/docs/**", "**/ISSUE_TEMPLATE/**", "**/pull_request_template.md", "**/.vscode/**"]' | ||
|
||
pre-commit-hooks: | ||
needs: check-jobs-to-skip | ||
if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} || ${{ github.event_name == 'push' }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 2 | ||
steps: | ||
- name: Checkout Code Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
# Run all pre-commit hooks on all the files. | ||
# Getting only staged files can be tricky in case a new PR is opened | ||
# since the action is run on a branch in detached head state | ||
- name: Install and Run Pre-commit | ||
uses: pre-commit/action@v2.0.3 | ||
|
||
build: | ||
needs: check-jobs-to-skip | ||
if: ${{ needs.check-jobs-to-skip.outputs.should_skip != 'true'}} || ${{ github.event_name == 'push' }} | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Conda | ||
uses: actions/cache@v2 | ||
env: | ||
# Increase this value to reset cache if conda/dev.yml has not changed in the workflow | ||
CACHE_NUMBER: 0 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-publish | ||
|
||
- name: Set up Conda Environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: "xcdat_dev" | ||
environment-file: conda-env/dev.yml | ||
channel-priority: strict | ||
auto-update-conda: true | ||
# IMPORTANT: This needs to be set for caching to work properly! | ||
use-only-tar-bz2: true | ||
|
||
- name: Run Tests | ||
run: | | ||
pytest | ||
- name: Upload Coverage Report | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: "tests_coverage_reports/coverage.xml" | ||
fail_ci_if_error: true |
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 |
---|---|---|
|
@@ -89,6 +89,4 @@ ENV/ | |
# Rope project settings | ||
.ropeproject | ||
|
||
# durack1 files | ||
recipes/conda-envs/pmp-1.1.2a.yml | ||
test/ |
Oops, something went wrong.