Skip to content

Commit 0154d71

Browse files
author
Joe Hamman
authored
Merge pull request #8 from jhamman/fix/ci
Github actions
2 parents 6b23a2c + 0860091 commit 0154d71

17 files changed

+379
-193
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"

.github/workflows/main.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: "*"
6+
pull_request:
7+
branches: master
8+
schedule:
9+
- cron: "0 0 * * *"
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/[email protected]
16+
- uses: actions/[email protected]
17+
- uses: pre-commit/[email protected]
18+
19+
test:
20+
name: ${{ matrix.python-version }}-build
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
python-version: [3.7, 3.8]
25+
steps:
26+
- uses: actions/[email protected]
27+
- name: Setup Python
28+
uses: actions/[email protected]
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
architecture: x64
32+
- uses: actions/[email protected]
33+
with:
34+
path: ~/.cache/pip
35+
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
36+
restore-keys: |
37+
${{ runner.os }}-pip-
38+
- run: |
39+
python -m pip install -r dev-requirements.txt
40+
python -m pip install --no-deps -e .
41+
python -m pip list
42+
- name: Running Tests
43+
run: |
44+
python -m pytest --cov=./ --cov-report=xml --verbose
45+
- name: Upload coverage to Codecov
46+
uses: codecov/codecov-action@v1
47+
if: ${{ matrix.python-version }} == 3.7
48+
with:
49+
file: ./coverage.xml
50+
fail_ci_if_error: false
51+
52+
test-upstream:
53+
name: ${{ matrix.python-version }}-dev-build
54+
runs-on: ubuntu-latest
55+
strategy:
56+
matrix:
57+
python-version: [3.7, 3.8]
58+
steps:
59+
- uses: actions/[email protected]
60+
- name: Setup Python
61+
uses: actions/[email protected]
62+
with:
63+
python-version: ${{ matrix.python-version }}
64+
architecture: x64
65+
- uses: actions/[email protected]
66+
with:
67+
path: ~/.cache/pip
68+
key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }}
69+
restore-keys: |
70+
${{ runner.os }}-pip-
71+
- run: |
72+
python -m pip install -r dev-requirements.txt
73+
python -m pip install --no-deps --upgrade \
74+
git+https://github.com/dask/dask \
75+
git+https://github.com/pydata/xarray \
76+
python -m pip install --no-deps -e .
77+
python -m pip list
78+
- name: Running Tests
79+
run: |
80+
python -m pytest --verbose

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var/
2222
*.egg-info/
2323
.installed.cfg
2424
*.egg
25+
doc/_build/
2526

2627
# PyInstaller
2728
# Usually these files are written by a python script from a template

.pre-commit-config.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.1.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-docstring-first
8+
- id: check-json
9+
- id: check-yaml
10+
- id: double-quote-string-fixer
11+
12+
- repo: https://github.com/ambv/black
13+
rev: 19.10b0
14+
hooks:
15+
- id: black
16+
args: ["--line-length", "80", "--skip-string-normalization"]
17+
18+
- repo: https://gitlab.com/pycqa/flake8
19+
rev: 3.8.3
20+
hooks:
21+
- id: flake8
22+
- repo: https://github.com/asottile/seed-isort-config
23+
rev: v2.2.0
24+
hooks:
25+
- id: seed-isort-config
26+
- repo: https://github.com/pre-commit/mirrors-isort
27+
rev: v5.2.1
28+
hooks:
29+
- id: isort
30+
31+
- repo: https://github.com/prettier/prettier
32+
rev: 2.0.5
33+
hooks:
34+
- id: prettier

.travis.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

dev-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pytest>=2.8
2+
coverage
3+
-r requirements.txt

0 commit comments

Comments
 (0)