diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 3d930e8..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,52 +0,0 @@ -version: 2.0 - -jobs: - build: - docker: - - image: circleci/node:12.18.3 - working_directory: ~/react-plotly.js - steps: - - checkout - - restore_cache: - keys: - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }} - - v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package.json" }} - - run: - name: Install dependencies - command: | - npm install - - run: - name: List dependency versions - command: | - echo "npm: $(npm --version)" - echo "node: $(node --version)" - npm ls || true - - save_cache: - paths: - - node_modules - key: v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }} - - persist_to_workspace: - root: . - paths: - - node_modules - - test: - docker: - - image: circleci/node:12.18.3 - working_directory: ~/react-plotly.js - steps: - - checkout - - attach_workspace: - at: ~/react-plotly.js - - run: - name: Run tests - command: npm run test - -workflows: - version: 2 - build-and-test: - jobs: - - build - - test: - requires: - - build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f483d66 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: test + +on: + push: + branches: [master] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm install + + - name: List dependency versions + run: | + echo "npm: $(npm --version)" + echo "node: $(node --version)" + npm ls || true + + - name: Run tests + run: npm run test diff --git a/.gitignore b/.gitignore index 19a1859..6432ba4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ npm-debug.log* *.sublime* .* -!.circleci +!.github !.gitignore !.gitattributes !.npmignore