Skip to content

Commit 3909e3c

Browse files
authored
feat: add some integration tests (#58)
1 parent 9e09c1e commit 3909e3c

File tree

15 files changed

+1088
-77
lines changed

15 files changed

+1088
-77
lines changed

.github/workflows/code_health.yaml

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,46 @@
11
---
22
name: Code Health
33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
88
jobs:
9-
check-style:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v4
15-
with:
16-
node-version-file: package.json
17-
cache: "npm"
18-
- name: Install dependencies
19-
run: npm ci
20-
- name: Run style check
21-
run: npm run check
9+
check-style:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version-file: package.json
17+
cache: "npm"
18+
- name: Install dependencies
19+
run: npm ci
20+
- name: Run style check
21+
run: npm run check
2222

23-
run-tests:
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
27-
- uses: actions/checkout@v4
28-
- uses: actions/setup-node@v4
29-
with:
30-
node-version-file: package.json
31-
cache: "npm"
32-
- name: Install dependencies
33-
run: npm ci
34-
- name: Run tests
35-
run: npm test
23+
run-tests:
24+
strategy:
25+
matrix:
26+
os: [ubuntu-latest, macos-latest, windows-latest]
27+
fail-fast: false
28+
runs-on: ${{ matrix.os }}
29+
steps:
30+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
31+
if: matrix.os != 'windows-latest'
32+
- name: Install keyring deps on Ubuntu
33+
if: matrix.os == 'ubuntu-latest'
34+
run: |
35+
sudo apt update -y
36+
sudo apt install -y gnome-keyring libdbus-1-dev
37+
38+
- uses: actions/checkout@v4
39+
- uses: actions/setup-node@v4
40+
with:
41+
node-version-file: package.json
42+
cache: "npm"
43+
- name: Install dependencies
44+
run: npm ci
45+
- name: Run tests
46+
run: npm test

.github/workflows/publish.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
---
22
name: Publish
33
on:
4-
push:
5-
tags:
6-
- v*
4+
push:
5+
tags:
6+
- v*
77
jobs:
8-
publish:
9-
runs-on: ubuntu-latest
10-
environment: Production
11-
steps:
12-
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
13-
- uses: actions/checkout@v4
14-
- uses: actions/setup-node@v4
15-
with:
16-
node-version-file: package.json
17-
registry-url: "https://registry.npmjs.org"
18-
cache: "npm"
19-
- name: Build package
20-
run: |
21-
npm ci
22-
npm run build
23-
- name: Publish to NPM
24-
run: npm publish
25-
env:
26-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27-
- name: Publish Github release
28-
run: |
29-
gh release create ${{ github.ref }} --title "${{ github.ref }}" --notes "Release ${{ github.ref }}" --generate-notes
8+
publish:
9+
runs-on: ubuntu-latest
10+
environment: Production
11+
steps:
12+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version-file: package.json
17+
registry-url: "https://registry.npmjs.org"
18+
cache: "npm"
19+
- name: Build package
20+
run: |
21+
npm ci
22+
npm run build
23+
- name: Publish to NPM
24+
run: npm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
- name: Publish Github release
28+
run: |
29+
gh release create ${{ github.ref }} --title "${{ github.ref }}" --notes "Release ${{ github.ref }}" --generate-notes

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ node_modules
88

99
# Sensitive
1010
state.json
11+
12+
tests/tmp

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
dist
22
coverage
33
package-lock.json
4+
tests/tmp

.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
"tabWidth": 2,
1919
"printWidth": 80
2020
}
21+
},
22+
{
23+
"files": "*.yaml",
24+
"options": {
25+
"tabWidth": 2,
26+
"printWidth": 80
27+
}
2128
}
2229
]
2330
}

0 commit comments

Comments
 (0)