This repository has been archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (120 loc) · 6.59 KB
/
test.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Testing
on: [push, pull_request]
env:
EMG_CONFIG: ${{ github.workspace }}/ci/config.yaml
API_URL: http://localhost:9000/metagenomics/api/v1/
SEARCH_URL: https://www.ebi.ac.uk/ebisearch/ws/rest/metagenomics_
jobs:
build:
runs-on: ubuntu-latest
# strategy:
# matrix:
# python-version: [3.6, 3.7.1, 3.8.6]
steps:
- name: 🌱 - Get git branch name
id: git-branch-name
uses: EthanSK/git-branch-name-action@v1
- uses: actions/checkout@v2
- name: 📣 - Announce git branch name
run: |
echo ${GIT_BRANCH_NAME}
- name: 🐍 - Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: 📜 - Set up JS Node 10
uses: actions/setup-node@v1
with:
node-version: '10'
- name: 💾 Start MongoDB
uses: supercharge/mongodb-github-action@1.3.0
with:
mongodb-version: 4.0.6
- name: 🔧🔬 - Install EMG API
run: |
python -V
pip install "git+git://github.com/EBI-metagenomics/emgapi@develop#egg=emgcli"
ls -l
- name: 💾 - Setting MySQL
run: |
sudo systemctl start mysql
mysql --version
mysql -uroot -proot -e 'CREATE DATABASE emg;'
mysql -uroot -proot -e 'CREATE DATABASE ena;'
mysql -uroot -proot -e "SET GLOBAL sql_mode = 'STRICT_TRANS_TABLES'"
emgcli migrate
mysql -uroot -proot --database=emg -e "SET FOREIGN_KEY_CHECKS = 0;"
for SQL_FIXTURE in ci/emg_sql_fixtures/*.sql; do echo "SQL >>>> $SQL_FIXTURE"; mysql -uroot -proot --database=emg < "$SQL_FIXTURE"; done
mysql -uroot -proot --database=emg -e "SET FOREIGN_KEY_CHECKS = 1;"
- name: 🪜 - Setting up Fixtures
run: |
source ci/create_download_files.sh
ls -lh ~/results
emgcli import_taxonomy ERR1022502 ~/results --pipeline 4.0
emgcli import_qc ERR1022502 ~/results --pipeline 4.0
emgcli import_summary ERR1022502 ~/results .ipr --pipeline 4.0
emgcli import_summary ERR1022502 ~/results .go_slim --pipeline 4.0
emgcli import_summary ERR1022502 ~/results .go --pipeline 4.0
emgcli import_taxonomy ERR1022502 ~/results --pipeline 2.0
emgcli import_qc ERR1022502 ~/results --pipeline 2.0
emgcli import_summary ERR1022502 ~/results .ipr --pipeline 2.0
emgcli import_summary ERR1022502 ~/results .go_slim --pipeline 2.0
emgcli import_summary ERR1022502 ~/results .go --pipeline 2.0
emgcli import_taxonomy ERR867655 ~/results --pipeline 4.0
emgcli import_qc ERR867655 ~/results --pipeline 4.0
emgcli import_summary ERR867655 ~/results .ipr --pipeline 4.0
emgcli import_summary ERR867655 ~/results .go_slim --pipeline 4.0
emgcli import_summary ERR867655 ~/results .go --pipeline 4.0
emgcli import_taxonomy ERP104236 ~/results --pipeline 4.0
emgcli import_qc ERP104236 ~/results --pipeline 4.0
emgcli import_summary ERP104236 ~/results .ipr --pipeline 4.0
emgcli import_summary ERP104236 ~/results .go_slim --pipeline 4.0
emgcli import_summary ERP104236 ~/results .go --pipeline 4.0
emgcli import_taxonomy ERZ477576 ~/results --pipeline 5.0
emgcli import_qc ERZ477576 ~/results --pipeline 5.0
emgcli import_contigs ERZ477576 ~/results --pipeline 5.0
emgcli import_summary ERZ477576 ~/results .ipr --pipeline 5.0
emgcli import_summary ERZ477576 ~/results .go --pipeline 5.0
emgcli import_summary ERZ477576 ~/results .go_slim --pipeline 5.0
emgcli import_summary ERZ477576 ~/results .pfam --pipeline 5.0
emgcli import_summary ERZ477576 ~/results .gprops --pipeline 5.0
emgcli import_summary ERZ477576 ~/results .antismash --pipeline 5.0
emgcli import_kegg_modules ${{ github.workspace }}/ci/fixtures/kegg_module_orthology.json
emgcli import_kegg_classes ${{ github.workspace }}/ci/fixtures/kegg_class_orthology.json
emgcli import_cog_descriptions ${{ github.workspace }}/ci/fixtures/cog.csv
emgcli import_genomes ~/results/ genomes/uhgg/2.0/ Human\ Gut 2.0 root:Host-Associated:Human:Digestive\ System:Large\ intestine
git clone --single-branch --branch develop https://github.com/EBI-Metagenomics/emgapi.git
mysql -uroot -proot --database=ena < ${{ github.workspace }}/ci/ena_db.sql
- name: 🔬 - Start EMG API
run: |
emgcli collectstatic --noinput
emgcli check --deploy
cd emgapi
export GUNICORN_CMD_ARGS="--bind 127.0.0.1:9000 --workers=1 --daemon -p emg.pid --error-logfile error.log --access-logfile access.log"
emgdeploy emgcli.wsgi:application
ps aux | grep emgdeploy
cd ..
curl --silent http://localhost:9000/v1/
- name: 🔧 - Install
run: |
npm ci
- name: 🧪 - Testing
run: |
export API_URL=http://localhost:9000/v1/
npm run test:single
- name: 🐞 - Error log
run: |
cat emgapi/error.log
cat emgapi/access.log
- name: 📮 - Slack Notification
uses: rtCamp/action-slack-notify@v2
continue-on-error: true
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'|| github.ref == 'refs/heads/compatible_with_django3_api'
env:
SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}"
SLACK_USERNAME: 'Github Actions API'
SLACK_ICON_EMOJI: ':octocat:'
SLACK_TITLE: 'webkit results in GitHub Actions'
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: '#metagenomics-notify'
MSG_MINIMAL: Actions URL