Skip to content

Commit c523184

Browse files
authored
Merge pull request #49 from swup/chore/add-tests-workflow
chore: add tests workflow, prepare for default `main` branch
2 parents 74755ab + 849e3c9 commit c523184

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Redeploy Docs
22
on:
33
push:
4-
branches: [master]
4+
branches: [main]
55

66
jobs:
77
redeploy-docs:
8-
uses: swup/.github/.github/workflows/redeploy-docs.yml@master
8+
uses: swup/.github/.github/workflows/redeploy-docs.yml@main
99
secrets: inherit

.github/workflows/unit-tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Unit tests
2+
3+
on:
4+
push:
5+
branches: [master, main, next]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
run-tests:
11+
name: Run unit tests
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: Check out repo
17+
uses: actions/checkout@v3
18+
19+
- name: Set up node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 18
23+
24+
- run: npm ci
25+
- run: npm run build
26+
27+
- name: Run tests
28+
run: npm run test:unit

.github/workflows/version-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: npm --no-git-tag-version version ${{ inputs.segment }}
2929
- uses: peter-evans/create-pull-request@v4
3030
with:
31-
base: 'master'
31+
base: 'main'
3232
branch: 'version/automated'
3333
title: 'Update package version (automated)'
3434
commit-message: 'Update package version'

0 commit comments

Comments
 (0)