Skip to content

Add pub. badge.

Add pub. badge. #33

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: "0 0 1 * *" # run monthly
jobs:
build:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
env:
APP_NAME: PIQMIe
APP_CONFIG: config.ini
APP_BASE_URL: http://127.0.0.1:8080
APP_DATA: a000000000000000000000000000000000000001
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install apt packages
run: |
apt update && apt install -y sqlite jq
- name: Check software versions
run: |
python --version
sqlite3 --version
jq --version
curl --version
- name: Install python deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip list
- name: Update app config path
run: |
pwd
ls
sed -i.org "s:/home/user:${{ github.workspace }}:" ${{ env.APP_CONFIG }}
cat ${{ env.APP_CONFIG }}
- name: Unzip app data
working-directory: ./data
run: |
tar xvf *.tar.bz2
- name: Start web app
working-directory: ../
run: |
cherryd -i ${{ env.APP_NAME }} -c ${{ env.APP_NAME }}/${{ env.APP_CONFIG }} &
sleep 10
HTTP_CODE=$(curl -I "${{ env.APP_BASE_URL }}/results/${{ env.APP_DATA }}" | grep HTTP | cut -f 2 -d " ")
echo $HTTP_CODE
if [ "$HTTP_CODE" != "200" ]; then
exit 1
fi
- name: Test JSON API endpoints
run: |
for p in $(echo statpep statprot statgrp statregrp); do
url=$(echo "${{ env.APP_BASE_URL }}/rest/${{ env.APP_DATA }}/$p")
echo "# $url #"
curl -s "$url" | jq .
done