|
11 | 11 | # Allows you to run this workflow manually from the Actions tab |
12 | 12 | workflow_dispatch: |
13 | 13 |
|
| 14 | +defaults: |
| 15 | + run: |
| 16 | + shell: bash |
| 17 | + |
14 | 18 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel |
15 | 19 | jobs: |
16 | 20 | # This workflow contains a single job called "build" |
17 | 21 | test: |
18 | 22 | # The type of runner that the job will run on |
19 | 23 | runs-on: ubuntu-latest |
20 | | - |
| 24 | + container: |
| 25 | + image: ghcr.io/puppeteer/puppeteer:19.7.2 |
| 26 | + # image: lironavon/docker-puppeteer-container:16.10.0 |
| 27 | + options: --cap-add=SYS_ADMIN --user 1001 |
21 | 28 | # Steps represent a sequence of tasks that will be executed as part of the job |
22 | 29 | steps: |
23 | 30 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
24 | 31 | - uses: actions/checkout@v3 |
25 | | - |
26 | | - - uses: actions/setup-node@v3 |
27 | | - with: |
28 | | - node-version: 16 |
29 | | - |
| 32 | + # - uses: actions/setup-node@v3 |
| 33 | + # with: |
| 34 | + # node-version: 16 |
30 | 35 | - name: npm install |
31 | | - run: cd .github/workflows && npm i |
| 36 | + run: npm i && cd .github/workflows && npm i && cd ../.. |
| 37 | + |
| 38 | + # - name: Run Tests |
| 39 | + # timeout-minutes: 1 |
| 40 | + # run: node .github/workflows/test.js |
32 | 41 |
|
33 | 42 | - name: Run Tests |
34 | | - run: node .github/workflows/test.js |
| 43 | + # run: (timeout 30s (npx .github/workflows/node_modules/uvu .github/workflows >> results.txt)) || [[ $? -eq 124 ]] && echo "Done Testing." |
| 44 | + # run: (timeout 60s node .github/workflows/test.js >> results.txt) || echo "Done Testing." |
| 45 | + run: timeout 15s node .github/workflows/test.js > results.txt || echo 'Done Testing. Results below:' && cat results.txt |
| 46 | + |
| 47 | + - name: Archive code coverage results |
| 48 | + uses: actions/upload-artifact@v3 |
| 49 | + with: |
| 50 | + path: results.txt |
| 51 | + retention-days: 5 |
| 52 | + |
| 53 | + - name: Check if Tests Passed |
| 54 | + run: "grep -q 'Passed: 4' results.txt" |
0 commit comments