From 24360d86b317d4bf60c5f888e47f2c91afd128d5 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Thu, 6 Nov 2025 17:28:44 +0100 Subject: [PATCH] Put everything in same workflow --- .gitea/workflows/pushImage.yaml | 18 +++++++++++++++--- .gitea/workflows/test.yaml | 19 ------------------- 2 files changed, 15 insertions(+), 22 deletions(-) delete mode 100644 .gitea/workflows/test.yaml diff --git a/.gitea/workflows/pushImage.yaml b/.gitea/workflows/pushImage.yaml index b04168d..e90ac70 100644 --- a/.gitea/workflows/pushImage.yaml +++ b/.gitea/workflows/pushImage.yaml @@ -1,13 +1,25 @@ -name: Push image to registry +name: Test, build and push image to registry on: push: - branches: - - main jobs: + phpunit-tests: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3.0' + - name: Install dependencies + run: composer install + - name: Run PHPUnit tests + run: vendor/bin/phpunit --configuration phpunit.xml build-image: needs: phpunit-tests + if: success() && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - name: Check out repository code diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml deleted file mode 100644 index a1c51c9..0000000 --- a/.gitea/workflows/test.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Launch the PHPunit tests -on: - push: - - -jobs: - phpunit-tests: - runs-on: ubuntu-latest - steps: - - name: Check out repository code - uses: actions/checkout@v4 - - name: Set up PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.3.0' - - name: Install dependencies - run: composer install - - name: Run PHPUnit tests - run: vendor/bin/phpunit --configuration phpunit.xml