-
Notifications
You must be signed in to change notification settings - Fork 1
116 lines (94 loc) · 3.7 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Tests
on:
pull_request:
push:
jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.10"]
steps:
- name: checkout
uses: actions/checkout@v4
- name: Do LFS checkout
# actions/checkout@v2 has a `with: lfs: true` option, but it only
# knows how to talk to GitHub’s LFS server.
#
# These actions are automatic if you have run `git lfs install`
# even once on your dev machine.
run: git lfs install --local && git lfs fetch && git lfs checkout
- name: Set up Python
id: set-up-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- run: pip install pipenv
# Started as copy-paste from
# https://github.com/actions/cache/blob/main/examples.md#python---pipenv
# but that has problems:
# 1. The cached virtualenv has `bin/python` as a symlink pointing
# at a specific bugfix release of python, e.g.,
# `/opt/hostedtoolcache/Python/3.7.11`, causing mysterious
# failures when GitHub patches python on the CI machines.
# 2. Setting `restore-key` to reuse caches from other Pipfile.lock
# versions can leave extra dependencies installed, because
# `pipenv install --dev` doesn’t `pipenv clean`
- uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ steps.set-up-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- run: pipenv install --dev
- run: make test
integration-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.10"]
steps:
- name: checkout
uses: actions/checkout@v2
- name: Do LFS checkout
# actions/checkout@v2 has a `with: lfs: true` option, but it only
# knows how to talk to GitHub’s LFS server.
#
# These actions are automatic if you have run `git lfs install`
# even once on your dev machine.
run: git lfs install --local && git lfs fetch && git lfs checkout
- name: Set up Python
id: set-up-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install pipenv
# Started as copy-paste from
# https://github.com/actions/cache/blob/main/examples.md#python---pipenv
# but that has problems:
# 1. The cached virtualenv has `bin/python` as a symlink pointing
# at a specific bugfix release of python, e.g.,
# `/opt/hostedtoolcache/Python/3.7.11`, causing mysterious
# failures when GitHub patches python on the CI machines.
# 2. Setting `restore-key` to reuse caches from other Pipfile.lock
# versions can leave extra dependencies installed, because
# `pipenv install --dev` doesn’t `pipenv clean`
- uses: actions/cache@v4
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ steps.set-up-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- run: pipenv install --dev
- name: Setup Node 22
uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: make integration-test