remove travis and improve github actions
This commit is contained in:
parent
bcd03d3aa2
commit
2edaa79bec
49
.github/workflows/test.yml
vendored
49
.github/workflows/test.yml
vendored
@ -8,11 +8,43 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
env:
|
||||||
|
CREATE_ADMIN: true
|
||||||
|
ADMIN_EMAIL: admin@localhost
|
||||||
|
ADMIN_USERNAME: admin
|
||||||
|
ADMIN_PASSWORD: admin
|
||||||
|
MAILER_URI: smtp://localhost:1025
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-linters:
|
run-linters:
|
||||||
name: Run linters
|
name: Run linters
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|
||||||
|
services:
|
||||||
|
maria:
|
||||||
|
image: mariadb
|
||||||
|
env:
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
MYSQL_DATABASE: ohmyform
|
||||||
|
options: >-
|
||||||
|
--health-cmd "mysqladmin ping"
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:10-alpine
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: root
|
||||||
|
POSTGRES_PASSWORD: root
|
||||||
|
POSTGRES_DB: ohmyform
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -35,3 +67,20 @@ jobs:
|
|||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
uses: andoshin11/typescript-error-reporter-action@v1.0.2
|
uses: andoshin11/typescript-error-reporter-action@v1.0.2
|
||||||
|
|
||||||
|
- name: PostgreSQL Migrations
|
||||||
|
run: yarn typeorm migration:run
|
||||||
|
env:
|
||||||
|
DATABASE_DRIVER: postgres
|
||||||
|
DATABASE_URL: postgresql://root@127.0.0.1:5432/ohmyform
|
||||||
|
|
||||||
|
- name: MariaDB Migrations
|
||||||
|
run: yarn typeorm migration:run
|
||||||
|
env:
|
||||||
|
DATABASE_DRIVER: mariadb
|
||||||
|
DATABASE_URL: mysql://root@127.0.0.1:3306/ohmyform
|
||||||
|
|
||||||
|
- name: SQLite Migrations
|
||||||
|
run: yarn typeorm migration:run
|
||||||
|
env:
|
||||||
|
DATABASE_DRIVER: sqlite
|
||||||
|
DATABASE_URL: sqlite://data.sqlite
|
||||||
|
|||||||
40
.travis.yml
40
.travis.yml
@ -1,40 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
|
|
||||||
services:
|
|
||||||
- mysql
|
|
||||||
- mysql
|
|
||||||
- postgresql
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- mysql -e 'CREATE DATABASE ohmyform;'
|
|
||||||
- psql -c 'create database ohmyform;' -U root
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- CREATE_ADMIN=true
|
|
||||||
- ADMIN_EMAIL=admin@localhost
|
|
||||||
- ADMIN_USERNAME=admin
|
|
||||||
- ADMIN_PASSWORD=admin
|
|
||||||
- MAILER_URI=smtp://localhost:1025
|
|
||||||
jobs:
|
|
||||||
- DATABASE_DRIVER=mariadb DATABASE_URL=mysql://root@127.0.0.1:3306/ohmyform
|
|
||||||
- DATABASE_DRIVER=postgres DATABASE_URL=postgresql://root@127.0.0.1:5432/ohmyform
|
|
||||||
- DATABASE_DRIVER=sqlite DATABASE_URL=sqlite://
|
|
||||||
|
|
||||||
node_js:
|
|
||||||
- 16
|
|
||||||
#- 14
|
|
||||||
#- 12
|
|
||||||
|
|
||||||
cache:
|
|
||||||
yarn: true
|
|
||||||
|
|
||||||
install:
|
|
||||||
#- rm yarn.lock
|
|
||||||
- yarn install
|
|
||||||
|
|
||||||
script:
|
|
||||||
- yarn lint
|
|
||||||
- yarn test
|
|
||||||
- yarn build
|
|
||||||
- yarn typeorm migration:run
|
|
||||||
Loading…
x
Reference in New Issue
Block a user