diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 317616a..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,49 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# - -jobs: - test-job: - docker: - - image: "cimg/node:lts" - - working_directory: ~/repo - - steps: - - checkout - # Download and cache dependencies - - restore_cache: - keys: - - dependencies-{{ checksum "yarn.lock" }} - # fallback to using the latest cache if no exact match is found - - dependencies- - - - run: yarn setup - - - save_cache: - paths: - - node_modules - - client/node_modules - - server/node_modules - key: dependencies-{{ checksum "yarn.lock" }} - - - run: - command: yarn lint - - - run: - command: yarn test - environment: - TZ: UTC - VITE_COMMIT_SHA: some_sha - - - store_artifacts: # For coverage report - path: client/coverage - -orbs: # declare what orbs we are going to use - node: circleci/node@2.0.2 # the node orb provides common node-related configuration - -version: 2.1 - -workflows: - tests: - jobs: - - test-job diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml new file mode 100644 index 0000000..bdb12af --- /dev/null +++ b/.github/workflows/lint-test.yml @@ -0,0 +1,32 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + pull_request: + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm i yarn -g + - run: yarn setup + env: + TZ: UTC + VITE_COMMIT_SHA: some_sha + - run: yarn lint + - run: yarn test