From f038b0c4879d82c0c25bddfdfc4cf9596393cc45 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 9 Jul 2020 16:38:29 +0800 Subject: [PATCH] chore: auto format by github action --- .github/workflows/format.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/test.yml | 5 +++-- .travis.yml | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000000..2ab6b92f2f --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,28 @@ +name: test + +on: + push: + branches: master + +jobs: + build: + + runs-on: ubuntu-16.04 + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12' + - run: yarn install + - run: npm run format + - name: Commit files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -m "style: auto format" -a + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b17531c79..0e93115f45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,10 +24,11 @@ jobs: - uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run : yarn install - - run: npm run test + - run: yarn install + - 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@v1 with: diff --git a/.travis.yml b/.travis.yml index 364d3ac7c0..dd3b7344f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ install: - yarn script: - - npm run test + - npm run jest after_script: - npm install codecov