Skip to content

Commit

Permalink
Merge pull request #10 from NCAR/migrate-to-github-action
Browse files Browse the repository at this point in the history
πŸ’š Migrate CI from CircleCI to GHA
  • Loading branch information
martindurant committed Dec 7, 2020
2 parents 0d4728e + 95bb42f commit e799112
Show file tree
Hide file tree
Showing 24 changed files with 237 additions and 280 deletions.
89 changes: 0 additions & 89 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[run]
omit =
omit =
tests/*.py
intake_thredds/_version.py
versioneer.py
Expand Down
11 changes: 11 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
# - package-ecosystem: pip
# directory: "/"
# schedule:
# interval: daily
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
# Check for updates once a week
interval: 'weekly'
78 changes: 78 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '0 0 * * *' # Daily β€œAt 00:00”
workflow_dispatch: # allows you to trigger manually

jobs:
build:
name: python-${{ matrix.python-version }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: strict
mamba-version: '*'
activate-environment: intake-thredds-dev
auto-update-conda: false
python-version: ${{ matrix.python-version }}

- name: Set up conda environment
run: |
mamba env update -f ci/environment.yml
python -m pip install .
conda list
- name: Run Tests
run: |
python -m pytest --cov=./ --cov-report=xml --verbose
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false

upstream-dev:
name: upstream-dev
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
channel-priority: strict
mamba-version: '*'
activate-environment: intake-thredds-dev
auto-update-conda: false
python-version: 3.8
- name: Set up conda environment
run: |
mamba env update -f ci/environment-upstream-dev.yml
python -m pip install .
conda list
- name: Run Tests
run: |
python -m pytest --cov=./ --cov-report=xml --verbose
34 changes: 0 additions & 34 deletions .github/workflows/docs.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: linting

on:
push:
branches: '*'
pull_request:
branches: '*'

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
62 changes: 0 additions & 62 deletions .github/workflows/main.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Upload Python Package
name: Publish intake-thredds to PyPI

on:
release:
types: [created]
types:
- published

jobs:
deploy:
Expand All @@ -16,11 +17,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools setuptools-scm wheel twine
python -m pip install setuptools setuptools-scm wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
python -m twine upload dist/* --skip-existing
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ venv.bak/


# Sphinx
docs/_build
docs/_build

0 comments on commit e799112

Please sign in to comment.