Skip to content

Commit

Permalink
Improve workflows
Browse files Browse the repository at this point in the history
They now run once a month to test new releases automatically.
They also test more things.
  • Loading branch information
atjn committed Jan 16, 2023
1 parent 15406d6 commit 83badde
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 13 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CodeQL

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "7 4 19 * *"

permissions:
actions: read
contents: read
security-events: write

jobs:

codeql:

strategy:
fail-fast: false
matrix:
language: [javascript]

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
34 changes: 21 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
name: Test

on: [push, pull_request]
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "7 4 19 * *"

permissions:
contents: read

jobs:

Expand All @@ -9,34 +18,33 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x]
# These version names ensure that new Node versions are automatically tested,
# but also ensures that the oldest supported version is changed on purpose.
node-version: [lts/*]
os: [ubuntu-latest, windows-latest, macOS-latest]
include:
- node-version: 14.13.0
- node-version: latest
os: ubuntu-latest
- node-version: lts/-1
os: ubuntu-latest
- node-version: 16.x
- node-version: 14.13.0
os: ubuntu-latest

runs-on: ${{ matrix.os }}

steps:

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Use npm cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
cache: npm

- name: Install dependencies
run: npm install
run: npm install-clean

- name: Test code
run: npm test

0 comments on commit 83badde

Please sign in to comment.