fix: remove unecessary mail server #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Tests' | |
on: | |
push: | |
branches: main | |
pull_request: | |
jobs: | |
lint: | |
name: 'lint (node: ${{ matrix.node }})' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [14, 16] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-build-node-modules | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Run lint | |
run: yarn run -s lint | |
unit_back: | |
name: 'unit_back (node: ${{ matrix.node }})' | |
needs: [lint] | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: strapi | |
POSTGRES_PASSWORD: strapi | |
POSTGRES_DB: strapi | |
ports: | |
- '5433:5432' | |
strategy: | |
matrix: | |
node: [14, 16] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-build-node-modules | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Run tests | |
run: yarn run -s test:back --coverage | |
unit_front: | |
name: 'unit_front (node: ${{ matrix.node }})' | |
needs: [lint] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [14, 16] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-build-node-modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-build-node-modules | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Build | |
run: yarn build:front | |
- name: Run test | |
run: yarn run -s test:front | |
# deploy: | |
# name: 'deploy' | |
# needs: ['unit_back', 'unit_front'] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Deploy to Zeus | |
# uses: appleboy/ssh-action@master | |
# with: | |
# host: ${{secrets.SSH_HOST}} | |
# username: ${{secrets.SSH_USERNAME}} | |
# password: ${{secrets.SSH_PASSWORD}} | |
# script: | | |
# cd lsalab-web | |
# git checkout main | |
# git pull origin main | |
# yarn & yarn deploy |