Distribution canary #718
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |