-
Notifications
You must be signed in to change notification settings - Fork 244
95 lines (83 loc) · 2.74 KB
/
ci_tests_legacy.yaml
File metadata and controls
95 lines (83 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# This workflow installs PyGMT and runs tests with old GMT versions
name: GMT Legacy Tests
on:
# push:
# branches: [ main ]
pull_request:
# types: [ready_for_review]
# paths-ignore:
# - 'doc/**'
# - 'examples/**'
# - '*.md'
# - 'README.rst'
# - 'LICENSE.txt'
# - '.gitignore'
# Schedule tests on Tuesday
schedule:
- cron: '0 0 * * 2'
jobs:
test:
name: ${{ matrix.os }} - GMT ${{ matrix.gmt_version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.8']
os: [ubuntu-20.04, macOS-11, windows-2019]
gmt_version: ['6.3']
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
# Checkout current git repository
- name: Checkout
uses: actions/[email protected]
with:
# fetch all history so that setuptools-scm works
fetch-depth: 0
- name: Setup Micromamba
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: "ci/requirements/tests_legacy.yml"
cache-downloads: true
cache-env: true
# override any specifications in the environment file
extra-specs: |
python=${{ matrix.python-version }}
gmt=${{ matrix.gmt_version }}
# Show installed pkg information for postmortem diagnostic
- name: List installed packages
run: micromamba list
# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
uses: dawidd6/[email protected]
with:
workflow: cache_data.yaml
workflow_conclusion: success
name: gmt-cache
path: .gmt
# Move downloaded files to ~/.gmt directory and list them
- name: Move and list downloaded remote files
run: |
mkdir -p ~/.gmt
mv .gmt/* ~/.gmt
# Change modification times of the two files, so GMT won't refresh it
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
ls -lhR ~/.gmt
# Pull baseline image data from dvc remote (DAGsHub)
- name: Pull baseline image data from dvc remote
run: |
dvc pull pygmt/tests/baseline/test_logo.png --verbose
ls -lhR pygmt/tests/baseline/
# Install the package that we want to test
- name: Install the package
run: make install
# Run the tests but skip images
- name: Run tests
run: make test_no_images PYTEST_EXTRA="-r P"