Skip to content

Commit

Permalink
run all checks in project-base GitHub actions build
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasLudvik committed Oct 17, 2023
1 parent ab7a058 commit 805087b
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/run-checks-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,41 @@ jobs:
with:
name: acceptance-logs
path: ./var/log

- name: Build Storefront part of application
run: |
docker compose cp ./project-base/app/schema.graphql storefront:/home/node/app/schema.graphql
docker compose exec storefront pnpm install --frozen-lockfile
- name: Check Storefront standards
run: docker compose exec storefront pnpm run check
- name: Run storefront unit tests
run: docker compose exec storefront pnpm test--no-watch
- name: Run Cypress tests
run: docker compose run cypress
- name: Upload Cypress videos to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress-videos
path: ./videos
- name: Upload Cypress screenshots to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress-screenshots
path: ./screenshots
- name: PHP-FPM container logs
if: ${{ failure() }}
run: docker compose logs php-fpm
- name: Nginx container logs
if: ${{ failure() }}
run: docker compose logs webserver
- name: Storefront container logs
if: ${{ failure() }}
run: docker compose logs storefront
- name: Cypress container logs
if: ${{ failure() }}
run: docker compose logs cypress
build-whole-application-for-single-domain:
name: Build application and run standards checks and tests on single domain
runs-on: 'ubuntu-20.04'
Expand All @@ -43,6 +78,10 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Remove all but first domain from next.config.js
run: |
node ./.github/workflows/keep-only-first-domain.js
cat ./.github/workflows/keep-only-first-domain.js
- name: Configure application
run: echo 1 | ./scripts/configure.sh
- name: Remove other domains than first one from configs
Expand Down Expand Up @@ -80,3 +119,38 @@ jobs:
with:
name: acceptance-logs
path: ./var/log

- name: Build Storefront part of application
run: |
docker compose cp ./project-base/app/schema.graphql storefront:/home/node/app/schema.graphql
docker compose exec storefront pnpm install --frozen-lockfile
- name: Check Storefront standards
run: docker compose exec storefront pnpm run check
- name: Run storefront unit tests
run: docker compose exec storefront pnpm test--no-watch
- name: Run Cypress tests
run: docker compose run cypress
- name: Upload Cypress videos to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress-videos
path: ./videos
- name: Upload Cypress screenshots to artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress-screenshots
path: ./screenshots
- name: PHP-FPM container logs
if: ${{ failure() }}
run: docker compose logs php-fpm
- name: Nginx container logs
if: ${{ failure() }}
run: docker compose logs webserver
- name: Storefront container logs
if: ${{ failure() }}
run: docker compose logs storefront
- name: Cypress container logs
if: ${{ failure() }}
run: docker compose logs cypress

0 comments on commit 805087b

Please sign in to comment.