Skip to content

Commit 7dc123f

Browse files
feat: add test job
1 parent 0fd73a6 commit 7dc123f

File tree

3 files changed

+61
-13
lines changed

3 files changed

+61
-13
lines changed

.github/workflows/lint_test_format.yaml

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,27 @@ name: lint_test_format
22
on:
33
workflow_dispatch:
44
jobs:
5-
lint:
6-
name: lint
5+
# lint:
6+
# name: lint
7+
# runs-on: ubuntu-latest
8+
# strategy:
9+
# matrix:
10+
# node-version: [14.x, 16.x, 18.x]
11+
# steps:
12+
# - name: Check out repository
13+
# uses: actions/checkout@v3
14+
# - name: Setup node ${{ matrix.node-version }}
15+
# uses: actions/setup-node@v3
16+
# with:
17+
# node-version: ${{ matrix.node-version }}
18+
# - name: Install dependencies
19+
# run: npm install
20+
# - name: Run lint-fix
21+
# run: npm run lint-fix
22+
# - name: Commit changes
23+
# uses: EndBug/add-and-commit@v9
24+
test:
25+
name: test
726
runs-on: ubuntu-latest
827
strategy:
928
matrix:
@@ -17,7 +36,35 @@ jobs:
1736
node-version: ${{ matrix.node-version }}
1837
- name: Install dependencies
1938
run: npm install
20-
- name: Run lint-fix
21-
run: npm run lint-fix
22-
- name: Commit changes
23-
uses: EndBug/add-and-commit@v9
39+
- name: Run test-coverage and tests
40+
run: npm run test-coverage
41+
env:
42+
API_BASE_URL: ${{ vars.API_BASE_URL }}
43+
SANDBOX_API_KEY: ${{ vars.SANDBOX_API_KEY }}
44+
TEST_APP_ID: ${{ vars.TEST_APP_ID }}
45+
TEST_APP_IDS: ${{ vars.TEST_APP_IDS }}
46+
TEST_APP_IDS_NO_ACCESS: ${{ vars.TEST_APP_IDS_NO_ACCESS }}
47+
TEST_APP_ID_NO_ACCESS: ${{ vars.TEST_APP_ID_NO_ACCESS }}
48+
TEST_ATTACHMENT: ${{ vars.TEST_ATTACHMENT }}
49+
TEST_ATTACHMENT_FIELD: ${{ vars.TEST_ATTACHMENT_FIELD }}
50+
TEST_ATTACHMENT_FIELD_NO_ACCESS_APP: ${{ vars.TEST_ATTACHMENT_FIELD_NO_ACCESS_APP }}
51+
TEST_ATTACHMENT_FIELD_NO_ACCESS_FIELD: ${{ vars.TEST_ATTACHMENT_FIELD_NO_ACCESS_FIELD }}
52+
TEST_FIELD_ID: ${{ vars.TEST_FIELD_ID }}
53+
TEST_FIELD_IDS: ${{ vars.TEST_FIELD_IDS }}
54+
TEST_FIELD_IDS_NO_ACCESS: ${{ vars.TEST_FIELD_IDS_NO_ACCESS }}
55+
TEST_FIELD_ID_NO_ACCESS: ${{ vars.TEST_FIELD_ID_NO_ACCESS }}
56+
TEST_IMAGE: ${{ vars.TEST_IMAGE }}
57+
TEST_IMAGE_FIELD: ${{ vars.TEST_IMAGE_FIELD }}
58+
TEST_LIST_FIELD: ${{ vars.TEST_LIST_FIELD }}
59+
TEST_LIST_FIELD_NO_ACCESS: ${{ vars.TEST_LIST_FIELD_NO_ACCESS }}
60+
TEST_LIST_ID: ${{ vars.TEST_LIST_ID }}
61+
TEST_LIST_ID_NO_ACCESS: ${{ vars.TEST_LIST_ID_NO_ACCESS }}
62+
TEST_LIST_ITEM_ID_NO_ACCESS: ${{ vars.TEST_LIST_ITEM_ID_NO_ACCESS }}
63+
TEST_RECORD: ${{ vars.TEST_RECORD }}
64+
TEST_REPORT: ${{ vars.TEST_REPORT }}
65+
TEST_REPORT_NO_ACCESS: ${{ vars.TEST_REPORT_NO_ACCESS }}
66+
TEST_REPORT_WITH_CHART_DATA: ${{ vars.TEST_REPORT_WITH_CHART_DATA }}
67+
TEST_SURVEY_AUTO_NUMBER_FIELD: ${{ vars.TEST_SURVEY_AUTO_NUMBER_FIELD }}
68+
TEST_SURVEY_ID: ${{ vars.TEST_SURVEY_ID }}
69+
TEST_SURVEY_RECORD_ID: ${{ vars.TEST_SURVEY_RECORD_ID }}
70+
TEST_TEXT_FIELD: ${{ vars.TEST_TEXT_FIELD }}

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"@istanbuljs/nyc-config-typescript": "^1.0.2",
5959
"@types/chai": "^4.3.4",
6060
"@types/mocha": "^10.0.1",
61+
"@types/node": "^18.14.0",
6162
"@types/sinon": "^10.0.13",
6263
"@typescript-eslint/eslint-plugin": "^5.50.0",
6364
"@typescript-eslint/parser": "^5.50.0",
@@ -83,4 +84,4 @@
8384
"axios": "^1.2.4",
8485
"form-data": "^4.0.0"
8586
}
86-
}
87+
}

0 commit comments

Comments
 (0)