-
Notifications
You must be signed in to change notification settings - Fork 3
97 lines (95 loc) · 3.2 KB
/
user_geneset_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
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
name: User Geneset Tests
on:
push: {}
pull_request:
branches:
- master
jobs:
run_user_geneset_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.3
env:
discovery.type : single-node
xpack.security.enabled: false
xpack.security.http.ssl.enabled: false
xpack.security.transport.ssl.enabled: false
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 9200:9200
steps:
- name: Create ES Index
run: |
sleep 60
curl -X PUT http://localhost:9200/user_genesets
- name: Clone frontend repo
uses: actions/checkout@v3
with:
repository: biothings/mygeneset.info-website
path: mygeneset.info-website
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install packages
run: yarn install
working-directory: mygeneset.info-website
- name: Build app
run: yarn build
working-directory: mygeneset.info-website
- name: Start Frontend
run: |
yarn serve &
sleep 30
working-directory: mygeneset.info-website
- name: Checkout MyGeneset source
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: pip install --upgrade pip
- name: Install dependencies
run: pip install -r requirements_web.txt
- name: Get web config file
run: wget https://gist.githubusercontent.com/ravila4/9f20d64f51fc23c10b1b70b679a7d3ab/raw/1199ab75b78cc71549fa73e6283810cf2c081682/config.py
working-directory: src
- name: Start API
run: python index.py --webapp &
working-directory: src
env:
ORCID_CLIENT_ID: ${{ secrets.ORCID_CLIENT_ID }}
ORCID_CLIENT_SECRET: ${{ secrets.ORCID_CLIENT_SECRET }}
- name: Install PyTest
run: pip install pytest
- name: Install Selenium
run: pip install selenium
- name: Install Selenium Wire
run: pip install selenium-wire
- name: Install Webdriver Manager
run: pip install webdriver-manager
- name: Install Blinker
run: pip install blinker==1.7.0
- name: Install/Upgrade setuptools
run: pip install --upgrade setuptools
- name: Run App Tests
run: pytest test_user_genesets.py
working-directory: src/tests
env:
ORCID_USERNAME: ${{ secrets.ORCID_USERNAME }}
ORCID_PASSWORD: ${{ secrets.ORCID_PASSWORD }}
GITHUB_USERNAME: ${{ secrets.GIT_HUB_USERNAME }}
GITHUB_PASSWORD: ${{ secrets.GIT_HUB_PASSWORD }}
- name: Setup tmate debug session on failure
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3