gha: cleanup and setup improvements (#2905)

This commit is contained in:
Denys Vuika 2023-01-16 12:57:28 +00:00 committed by GitHub
parent b50c4e993d
commit 02196ce733
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 49 deletions

View File

@ -8,7 +8,7 @@ on:
jobs: jobs:
lint: lint:
name: 'Lint' name: 'lint'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -24,9 +24,8 @@ jobs:
- run: npm ci - run: npm ci
- run: npm run lint - run: npm run lint
test-aca-content: build:
needs: lint name: 'build'
name: aca-content
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -40,11 +39,29 @@ jobs:
node-version: 14 node-version: 14
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
- run: npm test aca-content -- --browsers=ChromeHeadless --watch=false - run: npm run build --configuration=production,e2e
test-aca-content:
needs: [lint, build]
name: 'test: aca-content'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: node
uses: actions/setup-node@v3
with:
node-version: 14
cache: 'npm'
- run: npm ci
- run: npm test aca-content -- --browsers=ChromeHeadless --watch=false $TEST_OPTS
test-aos: test-aos:
needs: lint needs: [lint, build]
name: adf-office-services-ext name: 'test: adf-office-services-ext'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -58,11 +75,11 @@ jobs:
node-version: 14 node-version: 14
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
- run: npm test adf-office-services-ext -- --browsers=ChromeHeadless --watch=false - run: npm test adf-office-services-ext -- --browsers=ChromeHeadless --watch=false $TEST_OPTS
test-aca-shared: test-aca-shared:
needs: lint needs: [lint, build]
name: aca-shared name: 'test: aca-shared'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -76,11 +93,11 @@ jobs:
node-version: 14 node-version: 14
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
- run: npm test aca-shared -- --browsers=ChromeHeadless --watch=false - run: npm test aca-shared -- --browsers=ChromeHeadless --watch=false $TEST_OPTS
test-aca-settings: test-aca-settings:
needs: lint needs: [lint, build]
name: aca-settings name: 'test: aca-settings'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -94,11 +111,11 @@ jobs:
node-version: 14 node-version: 14
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
- run: npm test aca-settings -- --browsers=ChromeHeadless --watch=false - run: npm test aca-settings -- --browsers=ChromeHeadless --watch=false $TEST_OPTS
test-aca-folder-rules: test-aca-folder-rules:
needs: lint needs: [lint, build]
name: aca-folder-rules name: 'test: aca-folder-rules'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -112,4 +129,4 @@ jobs:
node-version: 14 node-version: 14
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
- run: npm test aca-folder-rules -- --browsers=ChromeHeadless --watch=false - run: npm test aca-folder-rules -- --browsers=ChromeHeadless --watch=false $TEST_OPTS

View File

@ -58,44 +58,12 @@ env:
jobs: jobs:
include: include:
- stage: Quality and Unit tests
name: 'Code quality checks'
script: npm ci && npm run lint
- stage: Quality and Unit tests - stage: Quality and Unit tests
name: 'Build (without animation)' name: 'Build (without animation)'
before_script: npx @alfresco/adf-cli update-commit-sha --pointer "HEAD" --pathPackage "$(pwd)"
script: npm ci && npm run build -- $BUILD_OPTS script: npm ci && npm run build -- $BUILD_OPTS
after_success: ./scripts/ci/utils/artifact-to-s3.sh -a $CONTENT_CE_DIST_PATH -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" || travis_terminate 1 after_success: ./scripts/ci/utils/artifact-to-s3.sh -a $CONTENT_CE_DIST_PATH -o "$S3_DBP_FOLDER/alfresco-content-app.tar.bz2" || travis_terminate 1
cache: false cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aos'
script: npm ci && ng test adf-office-services-ext $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-shared'
script: npm ci && ng test aca-shared $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-settings'
script: npm ci && ng test aca-settings $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-folder-rules'
script: npm ci && ng test aca-folder-rules $TEST_OPTS
cache: false
- stage: Quality and Unit tests
name: 'Unit tests: aca-content'
script:
- npm ci
- ng test aca-content $TEST_OPTS
cache: false
- stage: e2e - stage: e2e
name: 'Test Suites: authentication,listViews,navigation,application' name: 'Test Suites: authentication,listViews,navigation,application'
before_script: before_script: