From aeddc0824e6e343435dde38ba7d45282d8476f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Fabr=C3=A9gat?= Date: Thu, 5 Dec 2024 17:29:44 -0800 Subject: [PATCH] Create phpunit.yml --- .github/workflows/phpunit.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/phpunit.yml diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml new file mode 100644 index 0000000..419d3b5 --- /dev/null +++ b/.github/workflows/phpunit.yml @@ -0,0 +1,41 @@ +name: Run PHP Tests + +on: + push: + branches: + - main + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + services: + # Define the Docker service + db: + image: codeinchq/pdf2img:latest + env: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: testdb + ports: + - 3000:3000 + + steps: + # Check out the code + - name: Checkout code + uses: actions/checkout@v3 + + # Set up PHP with the version you need + - name: Set up PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.3 + tools: composer + + # Install dependencies + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + # Run tests + - name: Run tests + run: vendor/bin/phpunit \ No newline at end of file