Update README.md #46
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Test | |
on: | |
push: | |
branches-ignore: | |
- "main" | |
env: | |
VIRTUOSO_SERVER_URL: http://localhost:8890/sparql | |
VIRTUOSO_GRAPH_URI: http://localhost:8890/DAV | |
VIRTUOSO_TEST_GRAPH_URI: http://testing/ | |
VIRTUOSO_USERNAME: ${{ secrets.VIRTUOSO_USERNAME }} | |
VIRTUOSO_PASSWORD: ${{ secrets.VIRTUOSO_PASSWORD }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
virtuoso: | |
image: openlink/virtuoso-opensource-7:latest | |
ports: | |
- 8890:8890 | |
steps: | |
- name: Set permissions for virtuoso db directory | |
run: sudo chmod -R 777 ${{ github.workspace }}/knox_virtuoso_db || true | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Sleep seconds | |
run: sleep 10 | |
- name: Health check | |
id: test_virtuoso | |
run: | | |
OUTPUT=$(curl -s -H "Accept: application/json" -G --data-urlencode "query=select * where {?s ?p ?o} LIMIT 10" $VIRTUOSO_SERVER_URL) | |
echo "::set-output name=response::$OUTPUT" | |
shell: bash | |
- name: Run Go Tests | |
run: go test ./... |