Repository navigation
69 lines (66 loc) · 2.36 KB
/
Copy pathtest.yml
File metadata and controls
69 lines (66 loc) · 2.36 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
name: PyTest
on:
push:
branches: [main]
pull_request: {}
jobs:
test:
name: PyTest (${{ matrix.os }}, ${{ matrix.python }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: interscript/maps
path: maps
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install -e ".[dev]"
- run: pytest tests/ -v
env:
INTERSCRIPT_MAPS_PATH: ${{ github.workspace }}/maps/maps
conformance-matrix:
name: Conformance matrix (frozen fixtures)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e ".[dev]"
- name: Download fixtures (Releases via the API -- bypasses the asset-redirect CDN, which served stale entries after the WO79 republish)
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p fixtures && cd fixtures
dl() { # dl <tag> <asset-name> <out>
local id=$(gh api repos/interscript/interscript-models/releases/tags/$1 --jq ".assets[] | select(.name==\"$2\") | .id")
gh api -H "Accept: application/octet-stream" repos/interscript/interscript-models/releases/assets/$id > "$3"
}
dl index-v12 models-index.yaml models-index.yaml
dl index-v12 models-index.yaml.sha256 models-index.yaml.sha256
echo "$(cat models-index.yaml.sha256)" | sha256sum -c
for v in urd-diac-base fas-diac-base urd-g2p-base; do
dl index-v12 $v-vectors.json $v-vectors.json
done
# the two single-zip models; urd-g2p (split parts) resolves
# via the runtime resolver in a later matrix pass
for m in urd-diac-base-1.0 fas-diac-base-1.0; do
dl $m $m-fp16.zip $m.zip
done
- name: Run the matrix
run: |
for pair in "urd-diac-base-1.0 urd-diac-base" "fas-diac-base-1.0 fas-diac-base"; do
set -- $pair
echo "::group::$1"
SECRYST_E2E_ZIP="$PWD/fixtures/$1.zip" \
CONFORMANCE_VECTORS="$PWD/fixtures/$2-vectors.json" \
pytest tests_ml/test_conformance.py -v
echo "::endgroup::"
done