-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from myrotvorets/update-workflows
Update workflows
- Loading branch information
Showing
8 changed files
with
136 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: CodeQL Config | ||
|
||
paths: | ||
- lib | ||
|
||
paths-ignore: | ||
- node_modules | ||
|
||
queries: | ||
- uses: security-and-quality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,28 @@ | ||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- "**" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build and test (Node ${{ matrix.node.name }}) | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') || github.event_name == 'workflow_dispatch' }} | ||
strategy: | ||
matrix: | ||
node: | ||
- '14' | ||
- '16' | ||
- '18' | ||
name: Build and test (Node ${{ matrix.node }}) | ||
- { name: Current, version: current } | ||
- { name: LTS, version: lts/* } | ||
- { name: Previous LTS, version: lts/-1 } | ||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2 | ||
|
||
- name: Set up Node.js environment | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3.3.0 | ||
- name: Build and test | ||
uses: myrotvorets/composite-actions/build-test-nodejs@master | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
|
||
- name: Update npm | ||
run: npm i -g npm@latest | ||
|
||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run postinstall scripts | ||
run: npm rebuild && npm run prepare --if-present | ||
|
||
- name: Run tests | ||
run: npm test | ||
env: | ||
COLLECT_COVERAGE: "0" | ||
node-version: ${{ matrix.node.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: CodeQL Analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- "lib/**.ts" | ||
- ".github/workflows/codeql-analysis.yml" | ||
schedule: | ||
- cron: '24 2 * * 6' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Static Code Analysis with CodeQL | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: | ||
- javascript | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@41a4ada31ba866a7f1196b9602703a89edd69e22 # tag=v2.1.14 | ||
with: | ||
languages: ${{ matrix.language }} | ||
config-file: ./.github/codeql-config.yml | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@41a4ada31ba866a7f1196b9602703a89edd69e22 # tag=v2.1.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Dependency Review | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
name: Review Dependencies | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # tag=v1.4.3 | ||
with: | ||
egress-policy: block | ||
allowed-endpoints: > | ||
api.github.com:443 | ||
github.com:443 | ||
- name: Check out the source code | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2 | ||
|
||
- name: Review dependencies | ||
uses: actions/dependency-review-action@1c59cdf2a9c7f29c90e8da32237eb04b81bad9f0 # tag=v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.