Skip to content

Commit f20a453

Browse files
Bring back tests.
1 parent 7a8c86b commit f20a453

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

.fernignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
README.md
44
src/index.ts
55
src/wrapper
6-
.github/test.yml
6+
7+
# Workflows
8+
.github/workflows/check-updates.yml
9+
.github/workflows/test.yml
710

811
# tests
912
tests
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Check Update
2+
concurrency: check
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
# Automatically run on every Sunday
8+
- cron: '0 0 * * 0'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
token: ${{ secrets.WORKFLOW_SECRET }}
18+
19+
- name: Check for Update
20+
uses: saadmk11/github-actions-version-updater@v0.7.4
21+
with:
22+
token: ${{ secrets.WORKFLOW_SECRET }}
23+
release_types: 'major'

.github/workflows/test.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: test
2+
concurrency: build
3+
4+
on:
5+
push:
6+
branches:
7+
- 'main'
8+
pull_request:
9+
branches:
10+
- 'main'
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Prepare - Checkout
17+
uses: actions/checkout@v3.4.0
18+
19+
- name: Test - Start Compose
20+
run: docker-compose up -d
21+
working-directory: tests
22+
23+
- name: Test - RUN
24+
uses: kohlerdominik/docker-run-action@v1.1.0
25+
with:
26+
image: node
27+
environment: |
28+
CONFIG__WAIT=60
29+
CONFIG__SERVER__URL=http://localhost:8080
30+
default_network: host
31+
options: --name test1
32+
volumes: ${{ github.workspace }}:/src
33+
run: |
34+
cd /src
35+
yarn install
36+
./test.sh
37+
38+
- name: Test - Dump docker logs on failure
39+
if: failure()
40+
uses: jwalton/gh-docker-logs@v2.2.1
41+
with:
42+
images: 'squidex,squidex/resizer'
43+
tail: '100'
44+
45+
- name: Test - Cleanup
46+
if: always()
47+
run: docker-compose down
48+
working-directory: tests

0 commit comments

Comments
 (0)