Skip to content

test

test #3079

Workflow file for this run

name: test
on:
push:
schedule:
- cron: '0 1 */1 * *'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
type: ['test', 'test-db', 'test-e2e']
steps:
- name: Install Just
uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
- name: Pulling Docker images
run: just compose pull
- name: Pulling Cypress Docker image
if: matrix.type == 'test-e2e'
run: just compose -f docker/cypress-open.yml pull
- name: Building Docker images
run: just compose build
- name: Maintain Composer cache
uses: actions/cache@v3
with:
path: api/vendor
key: composer-${{ hashFiles('api/composer.lock') }}
restore-keys: composer-
- name: Maintain Yarn cache
uses: actions/cache@v3
with:
path: app/node_modules
key: yarn-${{ hashFiles('app/yarn.lock') }}
restore-keys: yarn-
- name: Install dependencies
run: just install
- name: Run ${{ matrix.type }}
run: just ${{ matrix.type }}
deploy:
needs: test
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Trigger deployment
uses: distributhor/workflow-webhook@v3
env:
webhook_url: ${{ secrets.WEBHOOK_URL }}
webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
silent: true
webhook_type: json-extended