[CLI] Github workflow

name: Development pipeline

on:
  pull_request:
    branches:
      - main

jobs:
  Server:
    runs-on: ubuntu-22.04
    steps:
      - name: Check files
        uses: actions/checkout@v3
      - name: Install node
        uses: actions/setup-node@v3
        with:
          node-version: '16'
      - name: Install npm
        run: |
          cd server
          npm ci
      - name: Eslint
        run: |
          cd server
          npm run lint
      - name: Run docker-compose
        run: docker-compose -f docker-compose.ci.yml up -d
      - name: Tests
        run: |
          cd server
          npm run test
  Client:
    runs-on: ubuntu-22.04
    steps:
      - name: Check files
        uses: actions/checkout@v3
      - name: Install node
        uses: actions/setup-node@v3
        with:
          node-version: '16'
      - name: Install npm
        run: |
          cd client
          npm ci
      - name: Eslint
        run: |
          cd client
          npm run lint
      - name: Tests
        run: |
          cd client
          npm run test

 

posted @ 2023-02-05 00:42  Zhentiw  阅读(21)  评论(0编辑  收藏  举报