-
Notifications
You must be signed in to change notification settings - Fork 638
70 lines (61 loc) · 1.96 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Build and Test
on: [push, pull_request]
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Node version
run: node -v
- name: Install
run: npm install
- name: Test
run: npm run test-headless
end-to-end-test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- selenium-browser: "chrome"
build-env: "build.prod"
- selenium-browser: "chrome"
build-env: "build.nonmin.travis"
- selenium-browser: "firefox"
build-env: "build.prod"
- selenium-browser: "firefox"
build-env: "build.nonmin.travis"
fail-fast: false
defaults:
run:
shell: bash
working-directory: tests
env:
SELENIUM_BROWSER: ${{ matrix.selenium-browser }}
BUILD_ENV: ${{ matrix.build-env }}
steps:
- uses: actions/checkout@v1
#- name: Install
# run: |
# npm install
- name: Install
run: docker-compose run -T --rm node npm install
- name: Start
run: docker-compose up -d ${SELENIUM_BROWSER}
- name: Build
run: docker-compose run -T --rm node npm run ${BUILD_ENV}
- name: Test
run: |
docker-compose exec -T node codeceptjs run-multiple -c /repo/tests/codeceptjs/codecept.json basic:${SELENIUM_BROWSER} --invert --grep '@optional'
pwd
ls -la codeceptjs/output
- name: Test Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: codeceptjs-output-${{ matrix.selenium-browser }}-${{ matrix.build-env }}
path: tests/codeceptjs/output
retention-days: 30
merge-multiple: true
- name: Test (optional)
continue-on-error: true
run: docker-compose exec -T node codeceptjs run-multiple -c /repo/tests/codeceptjs/codecept.json basic:${SELENIUM_BROWSER} --grep '@optional'