From 1242ecb82fd99ec8f44444e5ad81f81ba417c6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Sat, 19 Jul 2025 21:21:32 -0300 Subject: [PATCH] ci: add unit tests job --- .forgejo/workflows/unit-tests.yml | 29 +++++++++++++++++++++++++++++ README.md | 8 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .forgejo/workflows/unit-tests.yml diff --git a/.forgejo/workflows/unit-tests.yml b/.forgejo/workflows/unit-tests.yml new file mode 100644 index 0000000..6ba798d --- /dev/null +++ b/.forgejo/workflows/unit-tests.yml @@ -0,0 +1,29 @@ +name: Android Unit Tests + +on: + push: + branches: + - main +jobs: + tests: + runs-on: docker + container: + image: ghcr.io/cirruslabs/android-sdk:35 + + steps: + - name: Checkout code manually + run: | + git clone https://$TOKEN@${GIT_DOMAIN}/${GIT_REPO}.git . + git checkout "$GITHUB_SHA" + env: + TOKEN: ${{ secrets.RELEASE_TOKEN }} + GIT_DOMAIN: git.leomurca.xyz + GIT_REPO: leomurca/csgo-matches + + - name: Make Gradle wrapper executable + run: chmod +x ./gradlew + - name: Build and Run Unit Tests + run: | + ./gradlew assembleDebug testDebugUnitTest \ + -PAPI_BASE_URL={{ secrets.API_BASE_URL }}\ + -PACCESS_TOKEN="${{ secrets.ACCESS_TOKEN }}" \ No newline at end of file diff --git a/README.md b/README.md index 805adcd..ad54e9a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ # CS:GO Matches -![Logo](/docs/logo.png) \ No newline at end of file +![Logo](/docs/logo.png) + +![Unit tests](https://git.leomurca.xyz/leomurca/csgo-matches/actions/workflows/unit-tests.yml/badge.svg) + +**CS:GO Matches** is an Android app that displays Counter-Strike: Global Offensive (CS:GO) matches +from multiple global tournaments. It shows real-time and upcoming matches starting from the current +date, with detailed information on teams, players, and match times. \ No newline at end of file