Skip to content

Commit d120661

Browse files
committed
tests fix
1 parent 0f2123c commit d120661

File tree

11 files changed

+2474
-2405
lines changed

11 files changed

+2474
-2405
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,44 @@ on:
1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

14+
defaults:
15+
run:
16+
shell: bash
17+
1418
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1519
jobs:
1620
# This workflow contains a single job called "build"
1721
test:
1822
# The type of runner that the job will run on
1923
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
2128
# Steps represent a sequence of tasks that will be executed as part of the job
2229
steps:
2330
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2431
- 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
3035
- 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
3241

3342
- 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.'
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

Comments
 (0)