Skip to content

Commit

Permalink
ci: add ci workflow (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Jul 18, 2023
1 parent e76e180 commit e93aa9d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,43 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm install
- name: Lint files
run: npm run lint
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest]
node: [20.x, 19.x, 18.x, 17.x, 16.x, 14.x, 12.x, "12.22.0"]
include:
- os: windows-latest
node: "lts/*"
- os: macOS-latest
node: "lts/*"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -17,7 +17,7 @@
],
"scripts": {
"lint": "eslint .",
"test": "npm run lint && mocha ./tests/lib/**/*.js",
"test": "mocha ./tests/lib/**/*.js",
"new-rule-format": "node ./bin/eslint-transforms.js -t ./lib/new-rule-format/new-rule-format.js",
"generate-release": "eslint-generate-release",
"generate-alpharelease": "eslint-generate-prerelease alpha",
Expand Down

0 comments on commit e93aa9d

Please sign in to comment.