Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Workflows first draft #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Compare: https://github.com/pangeo-forge/pangeo-forge-recipes/blob/master/.github/workflows/main.yaml

name: Tests

on:
push:
branches: "*"
paths-ignore:
- 'docs/**'
pull_request:
branches: master
paths-ignore:
- 'docs/**'

env:
PYTEST_ADDOPTS: "--color=yes"

jobs:
test:
name: ${{ matrix.python-version }}-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
architecture: x64
# - name: Cache conda
# uses: actions/cache@v1
# env:
# Increase this value to reset cache if ci/py${{ matrix.python-version }}.yml has not changed
# CACHE_NUMBER: 0
# with:
# path: ~/conda_pkgs_dir
# key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/py${{ matrix.python-version }}.yml') }}
- name: setup miniconda
uses: conda-incubator/setup-miniconda@v2
with:
# activate-environment: pangeo-forge-recipes
# environment-file: ci/py${{ matrix.python-version }}.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
# use-only-tar-bz2: true
- name: install pangeo-forge-orchestrator plus deps
shell: bash -l {0}
run: |
poetry install
- name: print conda env
shell: bash -l {0}
run: |
conda info
conda list
- name: Run Tests
shell: bash -l {0}
run: |
pytest tests -v
# --redirect-dask-worker-logs-to-stdout=DEBUG \
# --cov=pangeo_forge_recipes --cov-config .coveragerc \
# --cov-report term-missing \
# --cov-report xml \
# --durations=10 --durations-min=1.0
#- name: Codecov
# uses: codecov/codecov-action@v2.0.2
# with:
# file: ./coverage.xml
# env_vars: OS,PYTHON
# name: codecov-umbrella
# fail_ci_if_error: false
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0