Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(test): faster mdx ci runtime #192

Draft
wants to merge 6 commits into
base: dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest"]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
env:
COSMOS_SDK_TAG: v0.45.8
container: ghcr.io/rnbguy/mdx-docker:nightly
steps:
- name: Restoring after GitHub default container params
run: |
echo "/home/opam/.opam/4.14/bin" >> $GITHUB_PATH
ln -s "/__t" "/opt/hostedtoolcache"
mkdir -p /home/runner
ln -s "/__w" "/home/runner/work"
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python ${{ matrix.python-version }}
Expand All @@ -44,16 +51,10 @@ jobs:
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Set up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.13.x
- name: Install MDX
run: opam install mdx
- name: Load cached simd
id: cached-simd
uses: actions/cache@v3
Expand All @@ -73,17 +74,16 @@ jobs:
make build
- name: Put Cosmos-SDK binary in system path
run: |
echo "PATH=$PATH:$(pwd)/cosmos-sdk/build" >> $GITHUB_ENV
echo "$(pwd)/cosmos-sdk/build" >> $GITHUB_PATH
- name: Setup Atomkraft and Apalache
run: |
source .venv/bin/activate
. .venv/bin/activate
poetry install --no-interaction
python -m pip install pyflakes==2.4.0 black pylama[all]
atomkraft model apalache get
- name: Run tests
run: |
source .venv/bin/activate
. .venv/bin/activate
cd tests/cli
eval $(opam env)
sed -i.bu "s|/dev/|/${{ github.ref_name }}/|g" *md
for f in `ls *md`; do ocaml-mdx test -v "${f}"; [ ! -f "${f}.corrected" ] || (diff -u "${f}" "${f}.corrected" && exit 1); done