-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,047 additions
and
57 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,6 +124,37 @@ jobs: | |
repo: eclipse/rdf4j | ||
workflow_id: ${{ github.run_id }} | ||
access_token: ${{ github.token }} | ||
e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-jdk11-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-jdk11-maven- | ||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install -y libxml2-utils | ||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Run end-to-end tests of RDF4J Server and Workbench | ||
working-directory: ./e2e | ||
run: ./run.sh | ||
- name: Cancel workflow on failure | ||
uses: vishnudxb/[email protected] | ||
if: failure() | ||
with: | ||
repo: eclipse/rdf4j | ||
workflow_id: ${{ github.run_id }} | ||
access_token: ${{ github.token }} | ||
copyright-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
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 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 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 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 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
# Initial sleep to make sure docker has started | ||
sleep 5 | ||
|
||
|
||
while : ; do | ||
STARTING=`docker ps -f "health=starting" --format "{{.Names}}"` | ||
if [ -z "$STARTING" ] #if STARTING is empty | ||
then | ||
break | ||
fi | ||
echo "Waiting for containers to finish starting" | ||
sleep 1 | ||
done | ||
|
||
|
||
while : ; do | ||
|
||
# Get cpu % from docker stats, remove '%' and then sum all the values into one number | ||
CPU=`docker stats --no-stream --format "{{.CPUPerc}}" | awk '{gsub ( "[%]","" ) ; print $0 }' | awk '{s+=$1} END {print s}'` | ||
echo "CPU: $CPU%" | ||
|
||
# Do floating point comparison, if $CPU is bigger than 15, WAIT will be 1 | ||
WAIT=`echo $CPU'>'15 | bc -l` | ||
echo "WAIT (0/1): $WAIT" | ||
|
||
sleep 1 | ||
|
||
# Get cpu % from docker stats, remove '%' and then sum all the values into one number | ||
CPU2=`docker stats --no-stream --format "{{.CPUPerc}}" | awk '{gsub ( "[%]","" ) ; print $0 }' | awk '{s+=$1} END {print s}'` | ||
echo "CPU2: $CPU2%" | ||
|
||
# Do floating point comparison, if $CPU is bigger than 15, WAIT will be 1 | ||
WAIT2=`echo $CPU'>'15 | bc -l` | ||
echo "WAIT2 (0/1): $WAIT2" | ||
|
||
# Break from loop if WAIT is 0, which is when the sum of the cpu usage is smaller than 15% | ||
[[ "$WAIT" -eq 0 ]] && [[ "$WAIT2" -eq 0 ]] && break | ||
|
||
# Else sleep and loop | ||
echo "Waiting for docker" | ||
sleep 1 | ||
|
||
done | ||
|
||
while : ; do | ||
STARTING=`docker ps -f "health=starting" --format "{{.Names}}"` | ||
if [ -z "$STARTING" ] #if STARTING is empty | ||
then | ||
break | ||
fi | ||
echo "Waiting for containers to finish starting" | ||
sleep 1 | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] | ||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
Oops, something went wrong.