Sfoglia il codice sorgente

ci: use github actions

Evan You 2 anni fa
parent
commit
1ca7c1d430
2 ha cambiato i file con 28 aggiunte e 94 eliminazioni
  1. 0 94
      .circleci/config.yml
  2. 28 0
      .github/workflows/ci.yml

+ 0 - 94
.circleci/config.yml

@@ -1,94 +0,0 @@
-version: 2
-
-defaults: &defaults
-  working_directory: ~/vuex
-  docker:
-    - image: circleci/node:12-browsers
-
-jobs:
-  install:
-    <<: *defaults
-    steps:
-      - checkout
-      - restore_cache:
-          keys:
-            - v1-vuex-{{ .Branch }}-{{ checksum "yarn.lock" }}
-            - v1-vuex-{{ .Branch }}
-            - v1-vuex
-      - run:
-          name: Installing Dependencies
-          command: yarn
-      - save_cache:
-          paths:
-            - ./node_modules
-          key: v1-vuex-{{ .Branch }}-{{ checksum "yarn.lock" }}
-      - persist_to_workspace:
-          root: ~/
-          paths:
-            - vuex
-
-  # lint-types:
-  #   <<: *defaults
-  #   steps:
-  #     - attach_workspace:
-  #         at: ~/
-  #     - run:
-  #         name: Linting
-  #         command: |
-  #           yarn lint --format junit --output-file test-results/eslint/results.xml
-  #     - run:
-  #         name: Testing Types
-  #         command: |
-  #           yarn test:types
-  #     - store_test_results:
-  #         path: test-results
-  #     - store_artifacts:
-  #         path: test-results
-
-  test-unit:
-    <<: *defaults
-    steps:
-      - attach_workspace:
-          at: ~/
-      - run:
-          name: Running Unit Tests
-          command: |
-            yarn test:unit
-
-  test-e2e:
-    <<: *defaults
-    steps:
-      - attach_workspace:
-          at: ~/
-      - run:
-          name: Running End-to-end Tests
-          command: |
-            yarn test:e2e
-
-  test-ssr:
-    <<: *defaults
-    steps:
-      - attach_workspace:
-          at: ~/
-      - run:
-          name: Running Server-side Rendering Tests
-          command: |
-            yarn test:ssr
-
-workflows:
-  version: 2
-  install-and-parallel-test:
-    jobs:
-      - install
-      # - lint-types:
-      #     requires:
-      #       - install
-      - test-unit:
-          requires:
-            - install
-      - test-e2e:
-          requires:
-            - install
-      - test-ssr:
-          requires:
-            - install

+ 28 - 0
.github/workflows/ci.yml

@@ -0,0 +1,28 @@
+name: 'ci'
+on:
+  push:
+    branches:
+      - '**'
+  pull_request:
+    branches:
+      - main
+
+permissions:
+  contents: read # to fetch code (actions/checkout)
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set node version to 16
+        uses: actions/setup-node@v2
+        with:
+          node-version: 16
+
+      - name: Install deps
+        uses: bahmutov/npm-install@v1
+
+      - name: Run tests
+        run: npm test