2020-01-09 07:35:04 +02:00
|
|
|
name: Node.js CI
|
2020-03-19 19:46:13 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- develop
|
|
|
|
pull_request:
|
2020-01-09 07:35:04 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_and_test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-04-28 03:22:01 +03:00
|
|
|
node-version: [14.x, 16.x]
|
2020-03-19 19:46:13 +02:00
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:10-alpine
|
|
|
|
ports:
|
|
|
|
- 5432:5432
|
|
|
|
env:
|
|
|
|
POSTGRES_DB: test-misskey
|
|
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
|
|
|
ports:
|
|
|
|
- 6379:6379
|
2020-01-09 07:35:04 +02:00
|
|
|
|
|
|
|
steps:
|
2020-05-08 11:46:58 +03:00
|
|
|
- uses: actions/checkout@v2
|
2020-01-09 07:35:04 +02:00
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2020-03-19 19:46:13 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
2021-08-16 10:33:45 +03:00
|
|
|
- name: Check yarn.lock
|
|
|
|
run: git diff --exit-code yarn.lock
|
2020-03-19 19:46:13 +02:00
|
|
|
- name: Copy Configure
|
|
|
|
run: cp .circleci/misskey/*.yml .config
|
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
|
|
|
- name: Test
|
|
|
|
run: yarn test
|
|
|
|
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12.x
|
2020-03-04 04:45:33 +02:00
|
|
|
- run: yarn install
|
2020-03-19 19:46:13 +02:00
|
|
|
- run: yarn lint
|