-
Notifications
You must be signed in to change notification settings - Fork 10
70 lines (59 loc) · 1.79 KB
/
canary.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
name: Distribution canary
on:
# push:
schedule:
- cron: '20 13 * * *'
jobs:
ocaml:
strategy:
fail-fast: false
matrix:
os:
- macos-12
- macos-11
- ubuntu-18.04
- ubuntu-20.04
ocaml-compiler:
- 4.14.x
runs-on: ${{ matrix.os }}
steps:
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Install OCaml bindings from OPAM
run: |
opam update
opam depext libdash
opam install libdash
- name: Test OPAM executables
run: test "$(echo hi | opam exec -- shell_to_json | opam exec -- json_to_shell)" = "hi"
python:
strategy:
fail-fast: true
matrix:
os:
- macos-12
- macos-11
- ubuntu-18.04
- ubuntu-20.04
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
repository_url:
- https://pypi.org/simple/
- https://test.pypi.org/simple/
runs-on: ${{ matrix.os }}
steps:
- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Python bindings from ${{ matrix.repository_url }}
run: pip install -v -i "${{ matrix.repository_url }}" --extra-index-url https://pypi.org/simple/ libdash
- name: Test Python library
run: |
RT="$(printf 'import libdash\nasts = libdash.parse("-", True)\nfor (ast, lines, linno_before, linno_after) in asts:\n print(libdash.to_string(ast))\n')"
test "$(echo hi | python -c "$RT")" = "hi"