Files
RSSHub/.github/workflows/test.yml
T
Tony 5326d9f751 chore(misc): multiple enhancement to github actions (#9000)
* chore: test workflow use redis

* chore: docker build cache sharing

* chore: eslint format yml files

* chore: nodemon restart on art template files changes

* chore: run test on multi node and os

* chore: unnecessary single version matrix build

* chore: fix container operations

Container operations are only supported on Linux runners

* chore: fix gha syntax

* chore: fix node version not show up

* revert: "chore: test workflow use redis"

This reverts commit df818fd697.

* revert: "chore: fix container operations"

This reverts commit c949368aa7.

* revert: "chore: run test on multi node and os"

This reverts commit 6b1cfde579.

* chore: run test on multi node version
2022-02-06 01:36:14 +08:00

36 lines
797 B
YAML

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: ['14', '16']
name: Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn
- run: npm run jest
env:
REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/
- run: npm run docs:build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}