Skip to content

PHRAS-3770 quarantine-enhancement #247

PHRAS-3770 quarantine-enhancement

PHRAS-3770 quarantine-enhancement #247

Workflow file for this run

name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches:
- master
env:
PHRASEANET_DOCKER_TAG: ${{ github.head_ref }}
REGISTRY: ghcr.io/${{ github.repository_owner }}
CACHE_REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
build-phraseanet-setup:
name: 'build phraseanet-setup'
uses: ./.github/workflows/build.yml
with:
image: phraseanet-setup
context: .
file: ./Dockerfile
target: phraseanet-setup
secrets: inherit
build-phraseanet-nginx:
name: 'build phraseanet-nginx'
uses: ./.github/workflows/build.yml
with:
image: phraseanet-nginx
context: .
file: ./Dockerfile
target: phraseanet-nginx
secrets: inherit
build-phraseanet-fpm:
name: 'build phraseanet-fpm'
uses: ./.github/workflows/build.yml
with:
image: phraseanet-fpm
context: .
file: ./Dockerfile
target: phraseanet-fpm
secrets: inherit
build-phraseanet-worker:
name: 'build phraseanet-worker'
uses: ./.github/workflows/build.yml
with:
image: phraseanet-worker
context: .
file: ./Dockerfile
target: phraseanet-worker
secrets: inherit
build-phraseanet-db:
name: 'build phraseanet-db'
uses: ./.github/workflows/build.yml
with:
image: phraseanet-db
context: ./docker/db
file: ./docker/db/Dockerfile
target: ''
secrets: inherit
build-phraseanet-elasticsearch:
name: 'build phraseanet-elasticsearch'
uses: ./.github/workflows/build.yml
with:
image: phraseanet-elasticsearch
context: ./docker/elasticsearch
file: ./docker/elasticsearch/Dockerfile
target: ''
secrets: inherit
test:
name: 'unit test'
runs-on: ubuntu-latest
needs:
- build-phraseanet-setup
- build-phraseanet-nginx
- build-phraseanet-fpm
- build-phraseanet-worker
- build-phraseanet-db
- build-phraseanet-elasticsearch
steps:
- name: checkout
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get tag name
if: github.event_name != 'pull_request'
shell: bash
run: echo "PHRASEANET_DOCKER_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
- name: install
run: |
PHRASEANET_DOCKER_REGISTRY=${{ env.REGISTRY }} PHRASEANET_DOCKER_TAG=${{ env.PHRASEANET_DOCKER_TAG }} docker compose pull
PHRASEANET_DOCKER_REGISTRY=${{ env.REGISTRY }} PHRASEANET_DOCKER_TAG=${{ env.PHRASEANET_DOCKER_TAG }} docker compose up -d
- name: init tools test
run: |
docker compose exec -T -e PHRASEANET_BASE_URL=http://127.0.0.1 phraseanet docker/phraseanet/setup/init-test-install.sh
- name: test exclude-group legacy
run: |
docker compose exec -T phraseanet bin/console system:clear-cache
docker compose exec -T phraseanet php -d memory_limit=-1 vendor/phpunit/phpunit/phpunit --exclude-group legacy
- name: test group legacy and exclude-group web
run: |
docker compose exec -T phraseanet bin/console system:clear-cache
docker compose exec -T phraseanet php -d memory_limit=-1 vendor/phpunit/phpunit/phpunit --group legacy --exclude-group web
- name: test group web
run: |
docker compose exec -T phraseanet bin/console system:clear-cache
docker compose exec -T phraseanet php -d memory_limit=-1 vendor/phpunit/phpunit/phpunit --group web