Skip to content

Commit 470978d

Browse files
Merge pull request #19 from natlibfi-jonollil/feature-dependabot-actions
Features: dependabot and github actions
2 parents 3cc26a5 + 1e8cb42 commit 470978d

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
3+
version: 2
4+
updates:
5+
# Maintain dependencies for GitHub Actions
6+
- package-ecosystem: "github-actions"
7+
directory: "/"
8+
schedule:
9+
interval: "daily"
10+
time: "06:30"
11+
timezone: "EST"
12+
target-branch: "main"
13+
pull-request-branch-name:
14+
separator: "-"
15+
16+
# Minor updates to npm production dependencies daily
17+
- package-ecosystem: "npm"
18+
directory: "/"
19+
schedule:
20+
interval: "daily"
21+
time: "06:45"
22+
timezone: "EST"
23+
versioning-strategy: lockfile-only
24+
target-branch: "main"
25+
pull-request-branch-name:
26+
separator: "-"
27+
groups:
28+
production-dependencies:
29+
dependency-type: "production"
30+
development-dependencies:
31+
dependency-type: "development"

.github/workflows/automatic-tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Automatic-node-tests
2+
3+
on: push
4+
5+
jobs:
6+
build-node-versions:
7+
name: Node version matrix
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [14.x, 16.x, 18.x, 20.x]
13+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
14+
15+
steps:
16+
- name: Checkout the code
17+
uses: actions/checkout@v4 # https://github.com/actions/checkout
18+
- name: Setup Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v3 # https://github.com/actions/setup-node
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
cache: 'npm'
23+
env:
24+
NPM_CONFIG_IGNORE_SCRIPTS: true
25+
- run: npm audit --package-lock-only --production --audit-level=high
26+
- run: npm i
27+
- run: npm test
28+
- run: npm run build --if-present

0 commit comments

Comments
 (0)