File tree Expand file tree Collapse file tree 2 files changed +31
-11
lines changed Expand file tree Collapse file tree 2 files changed +31
-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
+ ng serve --host 0.0.0.0 --port 4200 & \
9
+ (wait-on http://0.0.0.0:4200 --timeout 30000 --interval 1000 && cypress run --headless) \
10
+ || { 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
3
3
on : [push, pull_request]
4
4
5
5
jobs :
6
- test :
6
+ test-angular19 :
7
7
runs-on : ubuntu-latest
8
8
container :
9
9
image : raschidjfr/ionic-blank:ionic8-angular19-cypress14
@@ -20,13 +20,23 @@ jobs:
20
20
21
21
- name : Run tests
22
22
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