Skip to content

Commit

Permalink
ci: update ci and add lint in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sebtiz13 committed Jul 31, 2023
1 parent c6c0ca5 commit c5856cf
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 3 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,43 @@ on:
types: [published]

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run test:lint

check-types:
name: Check types
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run types tests
run: npm run test:types

publish-npm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [lint, check-types]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 16
registry-url: https://registry.npmjs.org/
- run: |
npm install -g npm@9
npm ci
npm run build
npm publish
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/push_dev.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Push to dev branch

on:
push:
branches:
- "[0-9]+-dev"

jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run test:lint

check-types:
name: Check types
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run types tests
run: npm run test:types

0 comments on commit c5856cf

Please sign in to comment.