Skip to content

Merge pull request #54 from MetricsHub/dependabot/github_actions/metr… #36

Merge pull request #54 from MetricsHub/dependabot/github_actions/metr…

Merge pull request #54 from MetricsHub/dependabot/github_actions/metr… #36

name: Integration Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
integration-tests:
name: Run Integration Tests
runs-on: ubuntu-latest
services:
httpbin:
image: kennethreitz/httpbin
ports:
- 31888:80
steps:
- name: Wait for httpbin to be ready
run: |
for i in {1..10}; do
if curl -sSf http://localhost:31888/get >/dev/null; then
echo "httpbin is ready!"
exit 0
fi
echo "Waiting for httpbin..."
sleep 3
done
echo "httpbin did not start in time" >&2
exit 1
- name: Checkout Repository
uses: actions/checkout@v6
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: "17"
distribution: temurin
cache: maven
- name: Set up Maven settings.xml
uses: s4u/[email protected]
with:
sonatypeSnapshots: true
repositories: >-
[
{
"id": "central-snapshots",
"name": "Maven Repository Switchboard",
"url": "https://central.sonatype.com/repository/maven-snapshots",
"snapshots": { "enabled": true },
"releases": { "enabled": false }
}
]
- name: Run Integration Tests
env:
HTTPBIN_BASE_URL: http://localhost:31888
run: |
mvn clean -B verify -Pintegration-tests \
-Dhttpbin.url=$HTTPBIN_BASE_URL