-
Notifications
You must be signed in to change notification settings - Fork 15
111 lines (90 loc) · 3.25 KB
/
deno-dev.yml
File metadata and controls
111 lines (90 loc) · 3.25 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Integration test in --dev mode
# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests
name: deno-dev
# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
dev_build_int_tests:
# The type of runner that the job will run on
runs-on: [ci]
timeout-minutes: 1380
name: ${{ matrix.network }}
continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
strategy:
matrix:
include:
- network: 'opal'
- network: 'quartz'
- network: 'unique'
steps:
- name: Clean Workspace
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4.1.7
with:
ref: ${{ github.head_ref }} #Checking out head commit
- name: Read .env file
uses: xom9ikk/dotenv@v2.3.0
- name: Generate ENV related extend file for docker-compose
uses: cuchi/jinja2-action@v1.2.0
with:
template: .docker/docker-compose.tmp-dev.j2
output_file: .docker/docker-compose.${{ matrix.network }}.yml
variables: |
NETWORK=${{ matrix.network }}
- name: Show build configuration
run: cat .docker/docker-compose.${{ matrix.network }}.yml
- name: Build the stack
run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
- uses: denoland/setup-deno@v2
with:
deno-version: ${{ env.DENO_VERSION }}
cache: true
- name: Run tests
working-directory: js-packages/tests
run: |
deno install
../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && deno task test
env:
RPC_URL: http://127.0.0.1:9944/
# - name: Read output variables
# run: |
# echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"
- name: Run benchmark mintFee tests
working-directory: js-packages/scripts
run: |
deno install
deno -A ./benchmarks/mintFee/index.ts
- name: Run benchmark opsFee tests
working-directory: js-packages/scripts
run: |
deno install
deno -A ./benchmarks/opsFee/index.ts
- name: Stop running containers
if: always() # run this step always
run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down
- name: Remove builder cache
if: always() # run this step always
run: |
docker builder prune -f -a
docker system prune -f
docker image prune -f -a
# check:
# if: always()
# runs-on: [ ci ]
# needs:
# - dev_build_int_tests
# steps:
# - name: Install python3
# uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Decide whether the needed jobs succeeded or failed
# uses: re-actors/alls-green@v1.2.2
# with:
# jobs: ${{ toJSON(needs) }}