-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (88 loc) · 2.56 KB
/
Copy pathtest-python.yml
File metadata and controls
106 lines (88 loc) · 2.56 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
name: Test Python functions
on:
pull_request:
branches:
- master
paths:
- '**/*.py'
- '**/*.cpp'
- '**/*.h'
workflow_dispatch:
jobs:
run_unix_tests:
name: Run Python tests on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Clang
run: |
sudo apt update
sudo apt-get install -y clang
- name: Set environment variables for Clang
run: |
export CC=$(which clang)
export CXX=$(which clang++)
echo $CC
echo $CXX
clang --version
clang++ --version
- name: Get sources
run: |
mkdir -p checkout
chmod +x ./get_sources
./get_sources
working-directory: ./package
- name: Install NucleoFind
run: pip install .
working-directory: ./package
- name: Install pytest
run: pip install pytest
- name: Install NucleoFind models
run: |
nucleofind-install -m core
nucleofind-install -m nano
- name: Run tests
run : pytest tests
working-directory: ./package
run_windows_tests:
name: Run Python tests on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- uses: TheMrMilchmann/setup-msvc-dev@v3
with:
arch: x64
- name: Get sources
run: |
mkdir checkout
sh get_sources
working-directory: ./package
- name: Install NucleoFind
run: pip install .
working-directory: ./package
- name: Install pytest
run: pip install pytest
- name: Install NucleoFind models
run: |
nucleofind-install -m nano
nucleofind-install -m core
- name: Run tests
run : pytest tests
working-directory: ./package
debug:
needs: [run_unix_tests, run_windows_tests]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- uses: actions/checkout@v3
- name: Notify chat
uses: teknatha136/actions-google-chat-text-message@main
with:
google-chat-webhook: ${{ secrets.WEBHOOK_URL }}
text-message: ${{ github.actor }} attempted to merge a change into NucleoFind, but this PR failed testing. Link ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \n