From a76cfcaf30cb876d538c94d1611f74c5420ae14c Mon Sep 17 00:00:00 2001 From: aminecmi Date: Sat, 21 Dec 2024 21:02:56 +0100 Subject: [PATCH] test: action --- .gitea/workflows/assets/docker-compose.yml | 10 ++++++ .gitea/workflows/on_push_testing.yml | 40 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .gitea/workflows/assets/docker-compose.yml create mode 100644 .gitea/workflows/on_push_testing.yml diff --git a/.gitea/workflows/assets/docker-compose.yml b/.gitea/workflows/assets/docker-compose.yml new file mode 100644 index 0000000..6a21eee --- /dev/null +++ b/.gitea/workflows/assets/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' +services: + selfoss: + container_name: selfoss + image: rsprta/selfoss + network_mode: "host" + ports: + - "8888:8888" + + diff --git a/.gitea/workflows/on_push_testing.yml b/.gitea/workflows/on_push_testing.yml new file mode 100644 index 0000000..fe51dfe --- /dev/null +++ b/.gitea/workflows/on_push_testing.yml @@ -0,0 +1,40 @@ +name: Check master code +on: + push: + branches: + - testing + +jobs: + checkout: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Fetch tags +# run: git fetch --tags -p + - name: Init compose + uses: KengoTODA/actions-setup-docker-compose@v1 + with: + version: "2.23.3" + - name: run selfoss + run: | + docker compose -f .gitea/workflows/assets/docker-compose.yml up -d + response = $(curl 172.17.0.1:8888/api/about) + echo "response from curl= $response" +# - uses: actions/setup-java@v4 +# with: +# distribution: 'temurin' +# java-version: '17' +# - name: Setup Android SDK +# uses: android-actions/setup-android@v3 +# - name: Configure gradle... +# run: mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties +# - name: Build and test +# run: ./gradlew build --stacktrace + - name: Clean + if: success() || failure() + run: | + docker compose -f .gitea/workflows/assets/docker-compose.yml stop +