Skip to content

Commit

Permalink
ci: refactor (#156)
Browse files Browse the repository at this point in the history
* ci: refactor

* ci: fix formatting
  • Loading branch information
superical authored Jan 18, 2023
1 parent 4ed7559 commit 70ff40e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 16 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
on:
pull_request:
workflow_call:

env:
Expand All @@ -19,18 +18,6 @@ jobs:
- run: npm ci --ignore-scripts
- run: npm run lint

eslint-review:
name: ES Lint Review
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

commit-lint:
name: Commit Lint
runs-on: ubuntu-latest
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pull_requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
pull_request:
types: [ opened, reopened, synchronize ]

env:
NODE_ENV: ci

name: "Pull Requests"

jobs:
tests:
name: Tests
uses: ./.github/workflows/tests.yml

linters:
name: Linters
uses: ./.github/workflows/linters.yml

eslint-review:
name: ESLint Review
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ name: Release

jobs:
tests:
name: Tests
uses: ./.github/workflows/tests.yml

linters:
name: Linters
uses: ./.github/workflows/linters.yml

release:
name: Publish Release
runs-on: ubuntu-latest
needs: [tests, linters]
needs: [ tests, linters ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
on:
pull_request:
types: [ opened, reopened, synchronize ]
workflow_call:

env:
Expand Down

0 comments on commit 70ff40e

Please sign in to comment.