From 9ee1e41077b35f4081b4419b9d53f2e5da62ffdb Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 21 Nov 2019 19:44:32 +0800 Subject: [PATCH] Feature/GitHub actions (#3464) --- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..b180f18d8 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 }}