-
Notifications
You must be signed in to change notification settings - Fork 41
87 lines (73 loc) · 2.72 KB
/
pytests-upstream-xarray.yml
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
name: CI tests Upstream with Xarray >= 2024.3
on:
schedule:
- cron: "0 0 * * *" # Daily “At 00:00” UTC
workflow_dispatch: # allows you to trigger the workflow run manually
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
jobs:
all-free-but-xr:
# CI tests for environments with all possible requirements in free versions
name: All - Free - Py${{matrix.python-version}} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
if: |
always()
&& (
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
)
defaults:
run:
shell: bash -l {0}
# timeout-minutes: 45
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
aws-region: us-west-1
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ga-ci-tests-argopy-01
- name: Set environment variables
run: |
echo "CONDA_ENV_FILE=ci/requirements/py${{matrix.python-version}}-all-free-xarray-check.yml" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup Micromamba ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '1.5.10-0'
environment-name: argopy-tests
environment-file: ${{ env.CONDA_ENV_FILE }}
init-shell: bash
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
pytest-reportlog
- name: Install argopy
run: |
python -m pip install --no-deps -e .
- name: Version info
run: |
micromamba info
micromamba list
- name: Test with pytest
run: |
pytest -ra -v -s -c argopy/tests/pytest.ini --durations=10 \
--report-log output-${{ matrix.python-version }}-log.jsonl \
argopy/tests/test_fetchers_data_erddap.py
- name: Save tests log as artifact
uses: actions/upload-artifact@v4
with:
name: Argopy-Tests-All-${{matrix.python-version}}-${{matrix.os}}
path: output-${{ matrix.python-version }}-log.jsonl
retention-days: 90