فهرست منبع

add PR checks

Klaudiusz Dembler 4 سال پیش
والد
کامیت
d596c035f1
2فایلهای تغییر یافته به همراه43 افزوده شده و 1 حذف شده
  1. 42 0
      .github/workflows/atlas-pr.yml
  2. 1 1
      package.json

+ 42 - 0
.github/workflows/atlas-pr.yml

@@ -0,0 +1,42 @@
+name: Atlas
+on: [push, pull_request]
+
+jobs:
+  test:
+    name: Atlas Tests
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-latest]
+        node-version: [12.x]
+      fail-fast: true
+    steps:
+      - uses: actions/checkout@v2
+      - name: Use Node.js ${{matrix.node-version}}
+        uses: actions/setup-node@v1
+        with:
+          node-version: ${{matrix.node-version}}
+      - name: Install modules
+        run: yarn install --frozen-lockfile
+      - name: Run Tests
+        run: yarn coverage
+  lint:
+    name: Atlas Lint
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ubuntu-latest]
+        node-version: [12.x]
+      fail-fast: true
+    steps:
+      - uses: actions/checkout@v2
+      - name: Use Node.js ${{matrix.node-version}}
+        uses: actions/setup-node@v1
+        with:
+          node-version: ${{matrix.node-version}}
+      - name: Install root modules
+        run: yarn install --frozen-lockfile
+      - name: Install modules
+        run: yarn install --frozen-lockfile
+      - name: Run ESLint
+        run: yarn lint

+ 1 - 1
package.json

@@ -24,7 +24,7 @@
     "test": "react-app-rewired test --watchAll=false",
     "coverage": "yarn test --coverage",
     "eject": "react-app-rewired eject",
-    "lint": "eslint --ext .js,.jsx,.ts,.tsx",
+    "lint": "eslint --ext .js,.jsx,.ts,.tsx .",
     "storybook": "start-storybook -p 6006 --quiet -c src/shared/.storybook",
     "build-storybook": "build-storybook -c src/shared/.storybook",
     "queries:codegen": "apollo client:codegen --target typescript --passthroughCustomScalars --customScalarsPrefix=GQL",