Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sekaiking committed Nov 21, 2023
1 parent ffcd4c2 commit 61c70b3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 12 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Lint Code Base

on:
pull_request:
branches:
- main
push:
branches-ignore:
- main

jobs:
lint:
name: Lint Code Base
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install Dependencies
id: install
run: yarn install --frozen-lockfile

- name: Lint Code Base
id: super-linter
uses: super-linter/super-linter/slim@v5
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_DEFAULT_STYLE: prettier
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js
VALIDATE_JSCPD: false
23 changes: 11 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
name: Run Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
- push

jobs:
test:
name: Execute Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v2
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version: "16" # Adjust according to your needs
node-version: 20
cache: yarn

- name: Install Dependencies
run: yarn install
id: install
run: yarn install --frozen-lockfile

- name: Execute Test Tools
run: yarn test

0 comments on commit 61c70b3

Please sign in to comment.