Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add js lib tests to ci #1577

Merged
merged 47 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
dc668f2
build: add js-lib-tests
subotic Jan 15, 2020
7057c78
Merge branch 'develop' into wip/add-js-lib-tests-to-ci
subotic Jan 15, 2020
4c932df
build: add js-lib-tests
subotic Jan 15, 2020
81aaee2
build (ci): add running of js-lib-tests
subotic Jan 15, 2020
5b7814a
build (ci): add running of js-lib-tests
subotic Jan 15, 2020
b93b36b
build (ci): add running of js-lib-tests
subotic Jan 15, 2020
71ff3f2
build (ci): add running of js-lib-tests
subotic Jan 15, 2020
930dc8f
build (ci): add running of test-js-lib-integration
subotic Jan 16, 2020
47fefc8
Update Makefile
subotic Jan 16, 2020
acc866a
build (ci): add running of test-js-lib-integration
subotic Jan 17, 2020
b3ea607
build (ci): add running of test-js-lib-integration
subotic Jan 17, 2020
2152ce9
build (ci): add running of test-js-lib-integration
subotic Jan 17, 2020
429e235
build (ci): add running of test-js-lib-integration
subotic Jan 17, 2020
c0f627e
build (ci): add running of test-js-lib-integration
subotic Jan 17, 2020
55fefd2
build (ci): add running of test-js-lib-integration
subotic Jan 17, 2020
caa4ff6
build (ci): add running of test-js-lib-integration
subotic Jan 17, 2020
1714545
build (ci): add running of test-js-lib-integration
subotic Jan 21, 2020
7546cda
build (make): Add Github CI targets
subotic Jan 22, 2020
9877fe9
build (make): Add Github CI targets
subotic Jan 22, 2020
e9d6073
build (make): Add Github CI targets
subotic Jan 22, 2020
ae767fb
build (make): Add Github CI targets
subotic Jan 22, 2020
d775227
build (make): Add Github CI targets
subotic Jan 22, 2020
a0e3be0
build (make): Add Github CI targets
subotic Jan 22, 2020
e8fc0d1
build (make): Add Github CI targets
subotic Jan 23, 2020
5a6f4bc
build (make): Add Github CI targets
subotic Jan 28, 2020
7710d08
build (make): Add Github CI targets
subotic Jan 28, 2020
897632b
build (make): Add Github CI targets
subotic Jan 28, 2020
7d630b2
build (make): Add Github CI targets
subotic Jan 28, 2020
6cb63c6
build (make): Add Github CI targets
subotic Jan 28, 2020
7294fea
build (make): Add Github CI targets
subotic Jan 28, 2020
d5859a9
build (make): Add Github CI targets
subotic Jan 28, 2020
4dad401
build (make): Add Github CI targets
subotic Jan 29, 2020
32ac333
build: Use private repository for GraphDB license
subotic Feb 17, 2020
0f20879
build: Use private repository for GraphDB license
subotic Feb 17, 2020
8dec4de
build: add setting graphdb heap size through environment variable
subotic Feb 18, 2020
d6ccf07
Merge branch 'develop' into wip/add-js-lib-tests-to-ci
subotic Feb 19, 2020
f981f6a
build (make): Add Github CI targets
subotic Feb 19, 2020
f967b0d
Merge branch 'wip/add-js-lib-tests-to-ci' of github.com:dasch-swiss/k…
subotic Feb 19, 2020
b4c426f
fix (routing): raise timeout
subotic Feb 21, 2020
e538a56
Merge branch 'develop' into wip/add-js-lib-tests-to-ci
subotic Feb 21, 2020
410eee0
build (make): Add Github CI targets
subotic Feb 21, 2020
7be8fcf
build (make): add data loading script
subotic Feb 21, 2020
5527f3c
build (make): add data loading script
subotic Feb 21, 2020
a09b0d7
build (make): add data loading script
subotic Feb 22, 2020
023e8ce
build (make): add data loading script
subotic Feb 22, 2020
c93dc8f
build (make): add data loading script
subotic Feb 22, 2020
afcd93b
Merge branch 'develop' into wip/add-js-lib-tests-to-ci
subotic Feb 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 79 additions & 40 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push]

env:
KNORA_GDB_LICENSE: ${{ github.workspace }}/ci/graphdb.license
KNORA_GDB_LICENSE: ${{ github.workspace }}/ci/graphdb/UNIBAS_DEV_GRAPHDB_SE_latest-31-12-2020_1cores.license

jobs:
compile:
Expand Down Expand Up @@ -54,9 +54,16 @@ jobs:
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Checkout source
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Checkout private ci-assets
uses: actions/checkout@v2
with:
repository: dasch-swiss/dsp-ci-assets
token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains the PAT.
path: ci
- name: cache maven artifacts
uses: actions/cache@v1
with:
Expand All @@ -66,26 +73,28 @@ jobs:
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: prepare needed graphdb-se files
run: |
echo ${{ secrets.license_encryption_key }} | gpg --quiet --batch --yes --decrypt --passphrase-fd 0 --output $GITHUB_WORKSPACE/ci/secrets.tar $GITHUB_WORKSPACE/ci/secrets.tar.gpg
tar -C ci -xvf ci/secrets.tar
mkdir -p $GITHUB_WORKSPACE/graphdb
cp $GITHUB_WORKSPACE/ci/graphdb.license $GITHUB_WORKSPACE/graphdb/graphdb.license
cp $GITHUB_WORKSPACE/webapi/scripts/KnoraRules.pie $GITHUB_WORKSPACE/graphdb
- name: Print env file
run: make print-env-file
run: |
make env-file
make print-env-file
- name: Run API unit tests
run: make unit-tests-with-coverage
run: make test-unit-ci

api-e2e-tests:
name: API E2E Tests
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Checkout source
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Checkout private ci-assets
uses: actions/checkout@v2
with:
repository: dasch-swiss/dsp-ci-assets
token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains the PAT.
path: ci
- name: cache maven artifacts
uses: actions/cache@v1
with:
Expand All @@ -95,26 +104,28 @@ jobs:
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: prepare needed graphdb-se files
run: |
echo ${{ secrets.license_encryption_key }} | gpg --quiet --batch --yes --decrypt --passphrase-fd 0 --output $GITHUB_WORKSPACE/ci/secrets.tar $GITHUB_WORKSPACE/ci/secrets.tar.gpg
tar -C ci -xvf ci/secrets.tar
mkdir -p $GITHUB_WORKSPACE/graphdb
cp $GITHUB_WORKSPACE/ci/graphdb.license $GITHUB_WORKSPACE/graphdb/graphdb.license
cp $GITHUB_WORKSPACE/webapi/scripts/KnoraRules.pie $GITHUB_WORKSPACE/graphdb
- name: print env file
run: make print-env-file
run: |
make env-file
make print-env-file
- name: run API E2E tests
run: make e2e-tests-with-coverage
run: make test-e2e-ci

api-integration-tests:
name: API Integration Tests
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Checkout source
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Checkout private ci-assets
uses: actions/checkout@v2
with:
repository: dasch-swiss/dsp-ci-assets
token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains the PAT.
path: ci
- name: cache maven artifacts
uses: actions/cache@v1
with:
Expand All @@ -124,17 +135,45 @@ jobs:
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: prepare needed graphdb-se files
run: |
echo ${{ secrets.license_encryption_key }} | gpg --quiet --batch --yes --decrypt --passphrase-fd 0 --output $GITHUB_WORKSPACE/ci/secrets.tar $GITHUB_WORKSPACE/ci/secrets.tar.gpg
tar -C ci -xvf ci/secrets.tar
mkdir -p $GITHUB_WORKSPACE/graphdb
cp $GITHUB_WORKSPACE/ci/graphdb.license $GITHUB_WORKSPACE/graphdb/graphdb.license
cp $GITHUB_WORKSPACE/webapi/scripts/KnoraRules.pie $GITHUB_WORKSPACE/graphdb
- name: print env file
run: make print-env-file
run: |
make env-file
make print-env-file
- name: run API integration tests
run: make it-tests-with-coverage
run: make test-it-ci

js-lib-tests:
name: JS Lib Tests
needs: compile
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Checkout private ci-assets
uses: actions/checkout@v2
with:
repository: dasch-swiss/dsp-ci-assets
token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains the PAT.
path: ci
- name: cache maven artifacts
uses: actions/cache@v1
with:
path: ~/.ivy2
key: ${{ runner.OS }}-build-${{ hashFiles('**/KnoraBuild.sbt') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: install requirements
run: sudo apt-get install expect
- name: print env file
run: |
make env-file
make print-env-file
- name: run JS lib tests
run: make test-js-lib-integration

upgrade-unit-tests:
name: Upgrade Unit Tests
Expand All @@ -161,9 +200,16 @@ jobs:
needs: compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Checkout source
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Checkout private ci-assets
uses: actions/checkout@v2
with:
repository: dasch-swiss/dsp-ci-assets
token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains the PAT.
path: ci
- uses: actions/setup-java@v1
with:
java-version: '11.x.x'
Expand All @@ -182,17 +228,10 @@ jobs:
run: |
make build-all-scala
make build-all-images
- name: prepare needed graphdb-se files
run: |
echo ${{ secrets.license_encryption_key }} | gpg --quiet --batch --yes --decrypt --passphrase-fd 0 --output $GITHUB_WORKSPACE/ci/secrets.tar $GITHUB_WORKSPACE/ci/secrets.tar.gpg
tar -C ci -xvf ci/secrets.tar
mkdir -p $GITHUB_WORKSPACE/graphdb
cp $GITHUB_WORKSPACE/ci/graphdb.license $GITHUB_WORKSPACE/graphdb/graphdb.license
cp $GITHUB_WORKSPACE/webapi/scripts/KnoraRules.pie $GITHUB_WORKSPACE/graphdb
- name: start and initialize graphdb-se
run: |
docker network create knora-net
docker run --rm -d --name=db --network=knora-net -p 127.0.0.1:7200:7200 -v $GITHUB_WORKSPACE/ci/graphdb.license:/graphdb/graphdb.license -e GDB_HEAP_SIZE=$GDB_HEAP_SIZE daschswiss/knora-graphdb-se -Dgraphdb.license.file=/graphdb/graphdb.license
docker run --rm -d --name=db --network=knora-net -p 127.0.0.1:7200:7200 -e GDB_HEAP_SIZE=$GDB_HEAP_SIZE daschswiss/knora-graphdb-se -Dgraphdb.license.file=/graphdb/graphdb.license
sleep 5
make init-db-test-minimal
- name: unzip test data
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
.ensime
.ensime_cache
.env
/.tmp/
native
**/.DS_Store
docs/env
Expand Down
Loading