-
Notifications
You must be signed in to change notification settings - Fork 14
65 lines (58 loc) · 1.62 KB
/
run-tests.yml
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
---
name: Run Test Suite
on:
workflow_dispatch:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}--${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os.runs-on }}
name: All tests
timeout-minutes: 30
strategy:
max-parallel: 4
fail-fast: false
matrix:
os:
- runs-on: macos-latest
- runs-on: ubuntu-latest
- runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python environment
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Setup simulator
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Test code with pytest
shell: bash
run: |
python3 -m venv venv
if [[ ${{ matrix.os.runs-on }} == windows-latest ]]; then
source ./venv/Scripts/activate
else
. ./venv/bin/activate
fi
pip install --extra-index https://pypi.chia.net/simple/ --editable .[dev]
chia init
echo -ne "\n" | chia dev sim create
export CHIA_ROOT=~/.chia/simulator/main/
chia start wallet
sleep 10
chia wallet did create
pytest tests/test_mint.py