-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (38 loc) · 1.77 KB
/
main.yaml
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
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