FoundKey/.woodpecker/test.yml
Johann150 a10b8875d9
run CI on pushes to main
Since PRs seem to be much rarer than pushes to main, it makes more sense
to do it this way. Perhaps in the future, it would make sense to run it on
all pushes, but the question would be how PRs are handled.
2023-05-07 15:26:14 +02:00

48 lines
978 B
YAML

clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 1 # CI does not need commit history
recursive: true
depends_on:
- build
pipeline:
build:
when:
branch: main
event: push
image: node:18.6.0
commands:
- yarn install
- git diff --exit-code yarn.lock
- cp .woodpecker/misskey/test.yml .config
- yarn build
mocha:
when:
branch: main
event: push
image: node:18.6.0
commands:
- yarn mocha
e2e:
when:
branch: main
event: push
image: cypress/included:10.3.0
commands:
- npm run start:test &
- sleep 30 # wait for server to start
- cypress run --browser chrome
# TODO: upload screenshots and video artifacts?
# would need some kind of storage though
services:
postgres:
image: postgres:13
environment:
- POSTGRES_DB=test-misskey
- POSTGRES_HOST_AUTH_METHOD=trust
redis:
image: redis:6