File tree Expand file tree Collapse file tree 2 files changed +32
-11
lines changed Expand file tree Collapse file tree 2 files changed +32
-11
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ PKG_VERSION=$( cd $GITHUB_WORKSPACE /dist/ionic-header-parallax && npm pkg get version | tr -d ' "' )
3+ mkdir cypress
4+ cp -r $GITHUB_WORKSPACE /cypress/* ./cypress
5+ cp $GITHUB_WORKSPACE /cypress.config.ts .
6+ cp -r $GITHUB_WORKSPACE /src/app/home/* ./src/app/home
7+ npm i $GITHUB_WORKSPACE /dist/ionic-header-parallax-$PKG_VERSION .tgz
8+ cypress install
9+ ng serve --host 0.0.0.0 --port 4200 & \
10+ (wait-on http://0.0.0.0:4200 --timeout 30000 --interval 1000 && cypress run --headless) \
11+ || { echo ' Angular server failed to start' ; exit 1; }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Run Tests
33on : [push, pull_request]
44
55jobs :
6- test :
6+ test-angular19 :
77 runs-on : ubuntu-latest
88 container :
99 image : raschidjfr/ionic-blank:ionic8-angular19-cypress14
@@ -20,13 +20,23 @@ jobs:
2020
2121 - name : Run tests
2222 working-directory : /app
23- run : |
24- PKG_VERSION=$(cd $GITHUB_WORKSPACE/dist/ionic-header-parallax && npm pkg get version | tr -d '"')
25- mkdir cypress
26- cp -r $GITHUB_WORKSPACE/cypress/* ./cypress
27- cp $GITHUB_WORKSPACE/cypress.config.ts .
28- cp -r $GITHUB_WORKSPACE/src/app/home/* ./src/app/home
29- npm i $GITHUB_WORKSPACE/dist/ionic-header-parallax-$PKG_VERSION.tgz
30- ng serve --host 0.0.0.0 --port 4200 &
31- (wait-on http://0.0.0.0:4200 --timeout 30000 --interval 1000 && cypress run --headless) \
32- || { echo 'Angular server failed to start'; exit 1; }
23+ run : bash $GITHUB_WORKSPACE/.github/workflows/run-tests.sh
24+
25+ test-angular16 :
26+ runs-on : ubuntu-latest
27+ container :
28+ image : raschidjfr/ionic-blank:ionic8-angular16-cypress14
29+
30+ steps :
31+ - name : Checkout repository
32+ uses : actions/checkout@v4
33+
34+ - name : Install dependencies
35+ run : npm ci
36+
37+ - name : Build project
38+ run : npm run build
39+
40+ - name : Run tests
41+ working-directory : /app
42+ run : bash $GITHUB_WORKSPACE/.github/workflows/run-tests.sh
You can’t perform that action at this time.
0 commit comments