Skip to content

Commit

Permalink
fix: GH Lint Action (#1188)
Browse files Browse the repository at this point in the history
* fix: GH Lint Action - YAML Formatting

* fix: GH Lint Action - Ignore JSCPD for test files
  • Loading branch information
GuyKh authored Sep 3, 2024
1 parent d71c643 commit d010a59
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 35 deletions.
71 changes: 36 additions & 35 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[warn] Ignored unknown option --fix.
# This is a basic workflow to help you get started with Actions

name: CI
Expand All @@ -6,9 +7,9 @@ name: CI
# events but only for the master branch
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -19,40 +20,40 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_TYPESCRIPT_STANDARD: false
FILTER_REGEX_EXCLUDE: .*test/.*
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: npm install, npm run test
run: |
npm ci
npm test
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_TYPESCRIPT_STANDARD: false
FILTER_REGEX_EXCLUDE: .*test/.*
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: npm install, npm run test
run: |
npm ci
npm test
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions test/app.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-env node, mocha */
/* eslint no-unused-expressions:"off" */
/* jscpd:ignore-file */

import { App } from "./../src/app.js";
import { Commons } from "../src/commons.js";
Expand Down
2 changes: 2 additions & 0 deletions test/testCommons.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* jscpd:ignore-file */

import { Commons } from "../src/commons.js";
import { SlackModule } from "../src/slackModule.js";
import { HipChatModule } from "../src/hipChatModule.js";
Expand Down

0 comments on commit d010a59

Please sign in to comment.