Skip to content

Merge pull request #102 from dcSpark/feature/execution-cleanup #439

Merge pull request #102 from dcSpark/feature/execution-cleanup

Merge pull request #102 from dcSpark/feature/execution-cleanup #439

Workflow file for this run

on: ["push"]
name: Shinkai Test Workflow
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Build testing image
run: docker build -t testing_image:${SHORT_SHA} -f .github/Dockerfile .
- name: Run tests primitives cargo tests
run: docker run --rm --entrypoint /entrypoints/run-main-primitives-cargo-tests.sh testing_image:${SHORT_SHA}
- name: Run tests main cargo tests
run: docker run --rm --entrypoint /entrypoints/run-main-cargo-tests.sh testing_image:${SHORT_SHA}
- name: Remove image
if: always()
run: docker rmi testing_image:${SHORT_SHA} || true
test-wasm:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Build testing image - shinkai-message-wasm
run: docker build -t testing_image_wasm:${SHORT_SHA} -f .github/Dockerfile.wasm .
- name: Run tests shinkai-message-wasm cargo tests
run: docker run --rm --entrypoint /entrypoints/run-wasm-pack-tests.sh testing_image_wasm:${SHORT_SHA}
- name: Run tests shinkai-message-pyo3 python tests
run: docker run --rm --entrypoint /entrypoints/run-python-tests.sh testing_image_wasm:${SHORT_SHA}
- name: Remove image
if: always()
run: docker rmi testing_image_wasm:${SHORT_SHA} || true