Repository navigation
46 lines (42 loc) · 1.65 KB
/
Copy pathtest.yml
File metadata and controls
46 lines (42 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Tests on every push to main and on pull requests – errors show up before the release tag
name: Tests
on:
push:
branches: [main]
paths-ignore: ['**.md', 'docs/**']
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with:
node-version: 22
- run: node --test "test/*.test.js" # inkl. Browser-Selbsttest in Chrome (test/browser.test.js)
# Code check (1.19.9): only here, not in the image
- run: npm ci --no-audit --no-fund && npx eslint . # versions pinned in package-lock.json
- run: npm run typecheck # test14: type check of server + core.mjs (development only, not in the image)
# Test image (since 1.19.9): every push to main after green tests -> ghcr.io/…:edge.
# For trying things out on the server without a release; „latest“ and version numbers only come with a release tag.
edge:
if: github.event_name == 'push'
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7
with:
context: .
push: true
tags: ghcr.io/scripthost/funscript-player:edge