-
Notifications
You must be signed in to change notification settings - Fork 7
67 lines (55 loc) · 1.62 KB
/
python-tests.yml
File metadata and controls
67 lines (55 loc) · 1.62 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
name: Run Python Capstone Project Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run-tests:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install python-bitcoinrpc
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Set up Node.js with NVM
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install --lts
node -v
npm install
- name: Make scripts executable
run: |
chmod +x ./test.sh
chmod +x ./run.sh
chmod +x ./python/run-python.sh
- name: Run test.sh
run: |
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
./test.sh
- name: Check result
if: ${{ failure() }}
run: echo "❌ Some tests failed. Please review the output above."
- name: Check result on success
if: ${{ success() }}
run: echo "✅ All tests passed successfully!"
- name: Upload output file (optional)
if: success()
uses: actions/upload-artifact@v4
with:
name: out.txt
path: ./out.txt