Feature/GitHub actions (#3464)

This commit is contained in:
DIYgod 2019-11-21 19:44:32 +08:00 committed by GitHub
parent 0e441c6cf6
commit 9ee1e41077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 0 deletions

34
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379/tcp
options: --entrypoint redis-server
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run : yarn install
- run: npm run test
env:
REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}