aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/nodejs.yml39
1 files changed, 31 insertions, 8 deletions
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index 004fa75..2a0beaa 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -12,16 +12,12 @@ jobs:
Test:
runs-on: ubuntu-latest
- strategy:
- matrix:
- node-version: [14.x, 15.x]
-
steps:
- uses: actions/checkout@v2
- - name: Use Node.js ${{ matrix.node-version }}
+ - name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
- node-version: ${{ matrix.node-version }}
+ node-version: 14.x
- name: Install dependencies
run: yarn
- name: Fix config
@@ -30,5 +26,32 @@ jobs:
run: yarn lint
- name: Test Build
run: yarn build
- - name: Test formatting
- run: yarn prettier --check .
+
+ Check-Formatting:
+ runs-on: ubuntu-latest
+ name: Check formatting
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ fetch-depth: 0
+ - name: Use Node.js 14.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 14.x
+ - name: Install dependencies
+ run: yarn
+ - name: Configure git
+ run: |
+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+ - name: Format and commit code if needed
+ run: |
+ yarn format
+ git commit -am "Automatically format code"
+ - name: Push changes
+ uses: ad-m/github-push-action@master
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ branch: ${{ github.ref }}