Feature/dpg fixes and improvements #328
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull request | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
cypress: | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
name: Cypress tests | |
container: | |
image: cypress/browsers:node-20.11.1-chrome-123.0.6312.58-1-ff-124.0-edge-122.0.2365.92-1 | |
options: --user 1001 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- uses: sibiraj-s/action-eslint@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
eslint-args: '--quiet' | |
extensions: 'html,ts' | |
annotations: true | |
- name: Run unit tests | |
run: | | |
npm run test | |
- name: Add commit hash to version | |
run: | | |
npm version prepatch --no-git-tag-version --preid $(git rev-parse --short HEAD) | |
- name: Build | |
run: npm run build | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
if-no-files-found: error | |
retention-days: 5 | |
path: | | |
dist/sag-pkg-community-plugins/** | |
- name: Copy files for http-server into apps subfolder | |
run: | | |
mkdir -p dist/apps/sag-pkg-community-plugins | |
cp -r dist/sag-pkg-community-plugins/* dist/apps/sag-pkg-community-plugins | |
- name: Cypress run | |
uses: cypress-io/github-action@v5 | |
env: | |
grepTags: '@noShell' | |
with: | |
start: npm run http-server | |
install: false | |
wait-on: 'http://localhost:4200/apps/sag-pkg-community-plugins/index.html' | |
browser: chrome | |
record: false | |
config-file: cypress.config.ts | |
- name: Upload cypress screenshots | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
retention-days: 5 | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- name: Upload cypress videos | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
retention-days: 5 | |
name: cypress-videos | |
path: cypress/videos |