Python-based version of the QLever script #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: End-to-end test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
merge_group: | |
jobs: | |
end-to-end-test: | |
strategy: | |
fail-fast: true | |
# matrix: | |
# os: [ubuntu-22.04, macos-12] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install required tools and Python packages | |
run: | | |
sudo apt update | |
sudo apt install wget unzip flake8 expect | |
pip3 install psutil | |
- name: Install latest version of QLever (download Docker image and compile natively) | |
working-directory: ${{github.workspace}} | |
run: | | |
# Download Docker image. | |
docker pull adfreiburg/qlever | |
# Download QLever binaries. | |
mkdir qlever-binaries && cd $_ | |
wget -q https://ad-research.cs.uni-freiburg.de/downloads/qlever/ServerMain | |
wget -q https://ad-research.cs.uni-freiburg.de/downloads/qlever/IndexBuilderMain | |
chmod 755 ServerMain IndexBuilderMain | |
# Install depencies needed for running the binaries. | |
curl -Gs https://raw.githubusercontent.com/ad-freiburg/qlever/master/Dockerfile | sed -En 's/(add-apt|apt|tee)/sudo \1/g; s/^RUN //p' | sed '/^cmake/q' | sed -E 's/^(cmake.*)/mkdir -p build \&\& cd build\n\1\ncd ../' | sed -n '/^sudo/p' > INSTALL | |
cat INSTALL | |
source ./INSTALL | |
# Check that the docker image and the binaries work. | |
docker run adfreiburg/qlever --help > /dev/null | |
./ServerMain --help > /dev/null | |
./IndexBuilderMain --help > /dev/null | |
- name: Format and compile check | |
run: | | |
flake8 qlever.py | |
python3 -m py_compile qlever.py | |
- name: Test actions for olympics dataset, with Docker | |
working-directory: ${{github.workspace}} | |
run: | | |
mkdir olympics.with-docker && cd $_ | |
cp -a ../Qleverfile.ini . | |
unbuffer ../qlever.py get-data docker.USE_DOCKER=true index start status stop status | |
ls -lh | |
- name: Test actions for olympics dataset, without Docker | |
working-directory: ${{github.workspace}} | |
run: | | |
export PATH="$PATH:$(pwd)/qlever-binaries" | |
mkdir olympics.without-docker && cd $_ | |
cp -a ../Qleverfile.ini . | |
unbuffer ../qlever.py get-data docker.USE_DOCKER=false index start status stop status | |
ls -lh | |
- name: Test actions for olympics dataset, with and without Docker | |
working-directory: ${{github.workspace}} | |
run: | | |
export PATH="$PATH:$(pwd)/qlever-binaries" | |
mkdir olympics.with-and-without-docker && cd $_ | |
cp -a ../Qleverfile.ini . | |
unbuffer ../qlever.py get-data index | |
unbuffer ../qlever.py get-data docker.USE_DOCKER=false start | |
unbuffer ../qlever.py get-data docker.USE_DOCKER=true stop | |
unbuffer ../qlever.py get-data docker.USE_DOCKER=true start | |
unbuffer ../qlever.py get-data docker.USE_DOCKER=false stop | |
unbuffer ../qlever.py status | |
ls -lh |