Skip to content

Commit 983a623

Browse files
authored
chore: fix os workflow matrix (#98)
1 parent edb94d2 commit 983a623

17 files changed

+1098
-1229
lines changed

.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/release.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
name: Release on main
22

33
permissions:
4-
contents: write # to be able to publish a GitHub release
5-
issues: write # to be able to comment on released issues
6-
pull-requests: write # to be able to comment on released pull requests
7-
id-token: write # to enable use of OIDC for npm provenance
4+
contents: write # to be able to publish a GitHub release
5+
issues: write # to be able to comment on released issues
6+
pull-requests: write # to be able to comment on released pull requests
7+
id-token: write # to enable use of OIDC for npm provenance
88

99
on:
10-
push:
11-
branches:
12-
- main
10+
push:
11+
branches:
12+
- main
1313

1414
# Cancel previous workflows which might still be running
1515
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}
17-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1818

1919
jobs:
20-
release:
21-
name: Release
22-
runs-on: ubuntu-latest
23-
steps:
24-
- name: Checkout
25-
uses: actions/checkout@v3
26-
27-
- name: Install Node.js
28-
uses: actions/setup-node@v3
29-
with:
30-
node-version: 20
31-
32-
- name: Install dependencies
33-
run: npm install
34-
35-
- name: Run all tests
36-
run: npm test
37-
38-
- name: Release and publish
39-
run: npx semantic-release
40-
env:
41-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
20+
release:
21+
name: Release
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Install Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
32+
- name: Install dependencies
33+
run: npm install
34+
35+
- name: Run all tests
36+
run: npm test
37+
38+
- name: Release and publish
39+
run: npx semantic-release
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
name: Run Lint and Tests
22

33
on:
4-
pull_request:
5-
branches: [main]
4+
pull_request:
5+
branches: [main]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
os: [ubuntu-latest, macOS-latest, windows-latest]
13-
node-version: [10.x, 18.x, 20.x]
14-
steps:
15-
- uses: actions/checkout@v3
8+
build:
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macOS-latest, windows-latest]
12+
node-version: [18, 20]
13+
runs-on: ${{ matrix.os }}
1614

17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: ${{ matrix.node-version }}
15+
steps:
16+
- uses: actions/checkout@v4
2117

22-
- name: Install dependencies
23-
run: npm install
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: ${{ matrix.node-version }}
2422

25-
- name: Lint
26-
run: npm run lint
23+
- name: Install dependencies
24+
run: npm install
2725

28-
- name: Run tests
29-
run: npm test
26+
- name: Lint
27+
run: npm run lint
28+
29+
- name: Run tests
30+
run: npm test

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
package-lock=false
2+
save-exact=true

.prettierrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.prettierrc.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"singleQuote": false,
3+
"trailingComma": "all",
4+
"useTabs": true,
5+
"printWidth": 120,
6+
"overrides": [
7+
{
8+
"files": ["*.yml", "*.json"],
9+
"options": {
10+
"tabWidth": 2,
11+
"useTabs": false
12+
}
13+
}
14+
]
15+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ A prometheus based streaming consumer for metric streams.
77

88
## Usage
99

10-
- [Getting started with MetricsJS](https://metrics-js.github.io/introduction/getting-started/).
11-
- [Reference documentaiton for `@metrics/prometheus-consumer`](https://metrics-js.github.io/reference/prometheus-consumer/).
10+
- [Getting started with MetricsJS](https://metrics-js.github.io/introduction/getting-started/).
11+
- [Reference documentaiton for `@metrics/prometheus-consumer`](https://metrics-js.github.io/reference/prometheus-consumer/).

eslint.config.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import prettierConfig from "eslint-config-prettier";
2+
import prettierPlugin from "eslint-plugin-prettier/recommended";
3+
import globals from "globals";
4+
import js from "@eslint/js";
5+
6+
export default [
7+
js.configs.recommended,
8+
prettierConfig,
9+
prettierPlugin,
10+
{
11+
languageOptions: {
12+
globals: {
13+
...globals.node,
14+
...globals.browser,
15+
global: true,
16+
},
17+
},
18+
},
19+
{
20+
ignores: ["coverage/*", "dist/*"],
21+
},
22+
];

0 commit comments

Comments
 (0)