-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.44 KB
/
github-actions.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
name: Digital Object Gate Django webservices CI Workflow
on: [push]
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
env:
DOGLIB_VERSION: "1.0.2"
PYCURL_SSL_LIBRARY: openssl
EUROPEANA_WSKEY: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11.4"
- name: Update package manager
run: |
sudo apt-get update
pip install -U pip
pip install wheel
pip install requests
- name: Install DOGlib
run: |
sudo apt-get install libxml2-dev libxslt-dev libssl-dev libcurl4-openssl-dev
git clone --depth 1 --branch ${{ env.DOGLIB_VERSION }} https://github.com/clarin-eric/DOGlib.git
pip install ./DOGlib -r ./DOGlib/requirements.txt
- name: Install DOG applications
run: |
pip install ./dogapi
pip install ./dogui
pip install ./dogconfig
- name: Unittest DOGapp
run: python ./runtests.py
- name: Test running server
run: |
screen -m -d python ./dogconfig/manage.py runserver 127.0.0.1:8000
sleep 10
if [ $(curl -LI http://127.0.0.1:8000/api/swagger.json -o /dev/null -w '%{http_code}\n' -s) == 200 ]; then
echo "Local host accessible"
fi