mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-02 06:33:42 +08:00
36 lines
621 B
YAML
36 lines
621 B
YAML
|
name: ci
|
||
|
|
||
|
on: [push, pull_request]
|
||
|
|
||
|
jobs:
|
||
|
test:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
strategy:
|
||
|
matrix:
|
||
|
node-version: [14.x, 16.x, 18.x]
|
||
|
redis-tag: [5, 6]
|
||
|
|
||
|
services:
|
||
|
redis:
|
||
|
image: redis:${{ matrix.redis-tag }}
|
||
|
ports:
|
||
|
- 6379:6379
|
||
|
options: --entrypoint redis-server
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v1
|
||
|
|
||
|
- name: Use Node.js
|
||
|
uses: actions/setup-node@v2
|
||
|
with:
|
||
|
node-version: ${{ matrix.node-version }}
|
||
|
|
||
|
- name: Install
|
||
|
run: |
|
||
|
npm install
|
||
|
|
||
|
- name: Run tests
|
||
|
run: |
|
||
|
npm run test
|