|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: "*" |
| 6 | + pull_request: |
| 7 | + branches: main |
| 8 | + schedule: |
| 9 | + - cron: "0 0 * * *" |
| 10 | + |
| 11 | +jobs: |
| 12 | + lint: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2.3.4 |
| 16 | + - uses: actions/setup-python@v2.2.2 |
| 17 | + - uses: pre-commit/action@v2.0.3 |
| 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, 3.9] |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v2.3.4 |
| 27 | + - name: Setup Python |
| 28 | + uses: actions/setup-python@v2.2.2 |
| 29 | + with: |
| 30 | + python-version: ${{ matrix.python-version }} |
| 31 | + architecture: x64 |
| 32 | + - uses: actions/cache@v2.1.6 |
| 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 --verbose |
| 45 | +
|
| 46 | + test-upstream: |
| 47 | + name: ${{ matrix.python-version }}-dev-build |
| 48 | + runs-on: ubuntu-latest |
| 49 | + strategy: |
| 50 | + matrix: |
| 51 | + python-version: [3.8, 3.9] |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v2.3.4 |
| 54 | + - name: Setup Python |
| 55 | + uses: actions/setup-python@v2.2.2 |
| 56 | + with: |
| 57 | + python-version: ${{ matrix.python-version }} |
| 58 | + architecture: x64 |
| 59 | + - uses: actions/cache@v2.1.6 |
| 60 | + with: |
| 61 | + path: ~/.cache/pip |
| 62 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/dev-requirements.txt') }} |
| 63 | + restore-keys: | |
| 64 | + ${{ runner.os }}-pip- |
| 65 | + - run: | |
| 66 | + python -m pip install -r dev-requirements.txt |
| 67 | + python -m pip install --no-deps --upgrade \ |
| 68 | + git+https://github.com/dask/dask \ |
| 69 | + git+https://github.com/pydata/xarray |
| 70 | + python -m pip install --no-deps -e . |
| 71 | + python -m pip list |
| 72 | + - name: Running Tests |
| 73 | + run: | |
| 74 | + python -m pytest --verbose |
0 commit comments