mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
Bumps the github-actions group with 2 updates: [crowdin/github-action](https://github.com/crowdin/github-action) and [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools).
Updates `crowdin/github-action` from 2.6.1 to 2.7.0
- [Release notes](https://github.com/crowdin/github-action/releases)
- [Commits](2cc7959c56...b8012bd549
)
Updates `Alfresco/alfresco-build-tools` from 8.16.0 to 8.18.0
- [Release notes](https://github.com/alfresco/alfresco-build-tools/releases)
- [Commits](https://github.com/alfresco/alfresco-build-tools/compare/v8.16.0...v8.18.0)
---
updated-dependencies:
- dependency-name: crowdin/github-action
dependency-version: 2.7.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-actions
- dependency-name: Alfresco/alfresco-build-tools
dependency-version: 8.18.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-actions
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
228 lines
6.2 KiB
YAML
228 lines
6.2 KiB
YAML
name: "Pull request"
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
branches: [master, develop]
|
|
schedule:
|
|
- cron: '0 12 * * 1-5' #At 12:00 on every day-of-week from Monday through Friday.
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
BASE_URL: http://localhost
|
|
ADMIN_EMAIL: admin
|
|
ADMIN_PASSWORD: admin
|
|
HR_USER: admin
|
|
HR_USER_PASSWORD: admin
|
|
SCREENSHOT_USERNAME: ${{ secrets.SCREENSHOT_USERNAME }}
|
|
SCREENSHOT_PASSWORD: ${{ secrets.SCREENSHOT_PASSWORD}}
|
|
PLAYWRIGHT_E2E_HOST: http://localhost:4200
|
|
GH_BUILD_NUMBER: ${{ github.run_id }}
|
|
REPORT_PORTAL_URL: ${{ secrets.REPORT_PORTAL_URL }}
|
|
REPORT_PORTAL_TOKEN: ${{ secrets.REPORT_PORTAL_TOKEN }}
|
|
MAXINSTANCES: 2
|
|
RETRY_COUNT: 2
|
|
|
|
jobs:
|
|
lint:
|
|
name: 'lint'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'npm'
|
|
- run: npm ci
|
|
|
|
- name: lint affected
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
run: npm run affected:lint -- --base=origin/develop
|
|
- name: lint all
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
run: npx nx run-many --target=lint
|
|
- run: npm run stylelint
|
|
|
|
build:
|
|
name: 'build'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'npm'
|
|
- uses: ./.github/actions/before-install
|
|
- run: npm ci
|
|
- run: npx nx build aca-playwright-shared
|
|
- run: npm run build -- $BUILD_OPTS
|
|
|
|
- name: dist cache
|
|
if: ${{ success() }}
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: ./dist/content-ce
|
|
key: cache-dist-${{ github.run_id }}
|
|
|
|
unit-tests:
|
|
needs: [lint, build]
|
|
name: "Unit tests"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'npm'
|
|
- uses: ./.github/actions/before-install
|
|
- run: npm ci
|
|
|
|
- name: Test
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
run: npm run affected:test -- --browsers=ChromeHeadless --watch=false $TEST_OPTS --base=origin/develop
|
|
|
|
- name: Test all
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
run: npx nx run-many --target=test --browsers=ChromeHeadless --watch=false $TEST_OPTS
|
|
|
|
e2es-playwright:
|
|
needs: [lint, build, unit-tests]
|
|
name: 'E2E Playwright - ${{ matrix.e2e-suites.name }}'
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
NODE_OPTIONS: --dns-result-order=ipv4first
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
e2e-suites:
|
|
- name: "create-actions"
|
|
id: 1
|
|
- name: "folder-rules"
|
|
id: 2
|
|
- name: "viewer"
|
|
id: 3
|
|
- name: "authentication"
|
|
id: 4
|
|
- name: "navigation"
|
|
id: 5
|
|
- name: "special-permissions"
|
|
id: 6
|
|
- name: "pagination"
|
|
id: 7
|
|
- name: "list-views"
|
|
id: 8
|
|
- name: "share-action"
|
|
id: 9
|
|
- name: "copy-move-actions"
|
|
id: 10
|
|
- name: "library-actions"
|
|
id: 11
|
|
- name: "info-drawer"
|
|
id: 12
|
|
- name: "search"
|
|
id: 13
|
|
- name: "upload-download-actions"
|
|
id: 14
|
|
- name: "favorite-actions"
|
|
id: 15
|
|
- name: "delete-actions"
|
|
id: 16
|
|
- name: "edit-actions"
|
|
id: 17
|
|
- name: "smoke-test"
|
|
id: 18
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'npm'
|
|
|
|
- uses: ./.github/actions/before-install
|
|
- run: npm ci
|
|
|
|
- uses: actions/cache/restore@v4
|
|
id: cache
|
|
with:
|
|
path: ./dist/content-ce
|
|
key: cache-dist-${{ github.run_id }}
|
|
|
|
- name: Deploy local ACS
|
|
uses: ./.github/actions/deploy-local-acs
|
|
with:
|
|
docker_username: ${{ secrets.DOCKER_USERNAME }}
|
|
docker_password: ${{ secrets.DOCKER_PASSWORD }}
|
|
quay_username: ${{ secrets.QUAY_USERNAME }}
|
|
quay_password: ${{ secrets.QUAY_PASSWORD }}
|
|
|
|
- name: Before e2e
|
|
uses: ./.github/actions/before-e2e
|
|
|
|
- name: Before playwright
|
|
shell: bash
|
|
run: npx playwright install chromium
|
|
|
|
- uses: ./.github/actions/run-e2e-playwright
|
|
with:
|
|
options: "${{ matrix.e2e-suites.name }}"
|
|
artifact-name: ${{ matrix.e2e-suites.name }}
|
|
test-runner: playwright
|
|
|
|
- name: Debug Ingress Controller Logs
|
|
if: always()
|
|
run: |
|
|
kubectl logs -n ingress-nginx -l app.kubernetes.io/name=ingress-nginx --tail=-1
|
|
|
|
finalize:
|
|
if: ${{ always() }}
|
|
needs: [lint, build, unit-tests, e2es-playwright]
|
|
name: 'Finalize'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check previous jobs status
|
|
if: >-
|
|
${{
|
|
contains(needs.*.result, 'failure')
|
|
|| contains(needs.*.result, 'cancelled')
|
|
}}
|
|
run: exit 1
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Extract commit message
|
|
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v8.18.0
|
|
|
|
- name: Check ADF link
|
|
shell: bash
|
|
run: |
|
|
if [[ $COMMIT_MESSAGE == *"[link-adf:"* ]]; then
|
|
BRANCH=`echo $COMMIT_MESSAGE | grep -o "\[link-adf\:[^]]*\]" | sed -e 's#\[link-adf:##g' | sed -e 's#\]##g'`
|
|
echo -e "\e[31mPRs are not mergeable with conditional build. This build was run with custom ADF branch: $BRANCH \e[0m"
|
|
exit 1
|
|
fi;
|