-
Notifications
You must be signed in to change notification settings - Fork 362
96 lines (85 loc) · 2.45 KB
/
test.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
88
89
90
91
92
93
94
95
96
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Test
on:
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yml"
- ".pre-commit-config.yaml"
push:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yml"
- ".pre-commit-config.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
schedule:
# Run weekly test so we know if tests break for external reasons
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#scheduled-events
#
# At 10:36 on Sunday (https://crontab.guru)
- cron: '36 10 * * 0'
workflow_dispatch:
# Global environment variables
env:
GIT_COMMITTER_EMAIL: [email protected]
GIT_COMMITTER_NAME: CI User
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: CI User
jobs:
test:
runs-on: ubuntu-${{ matrix.ubuntu_version }}
strategy:
fail-fast: false
matrix:
ubuntu_version: ["22.04"]
python_version: ["3.9"]
repo_type:
- base
- conda
- dockerfile
- external
- julia
- nix
- pipfile
- r
- unit
- venv
include:
# The actions/setup-python action with Python version 3.6 isn't
# possible to use with the ubuntu-22.04 runner, so we use ubuntu-20.04
# for this test where Python 3.6 remain available.
- ubuntu_version: "20.04"
python_version: "3.6"
repo_type: venv
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python_version }}"
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
pip freeze
- name: Install repo2docker
run: |
python -m build --wheel .
pip install dist/*.whl
# add for mercurial tests
pip install mercurial hg-evolve
pip freeze
- name: Run pytest
run: |
pytest --verbose --color=yes --durations=10 --cov=repo2docker tests/${{ matrix.repo_type }}
- uses: codecov/codecov-action@v3