From 05f68ae482092d236d52aadca78e6e63812c8e21 Mon Sep 17 00:00:00 2001 From: Mordecai Velasco Date: Sat, 23 Jul 2022 22:59:31 +0800 Subject: [PATCH 1/4] Create node.js.yml --- .github/workflows/node.js.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..0715afe --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,30 @@ +# 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://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.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 ci + - run: npm test From 8729326773d2cdf3a1ea21b03943d888b4e1632a Mon Sep 17 00:00:00 2001 From: mrdcvlsc Date: Sat, 23 Jul 2022 23:21:07 +0800 Subject: [PATCH 2/4] migrate ci to github actions --- .circleci/config.yml | 34 ---------------------------------- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ .github/workflows/node.js.yml | 30 ------------------------------ README.md | 4 +++- 4 files changed, 29 insertions(+), 65 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/node.js.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 6ed94cd..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# -version: 2 -jobs: - build: - docker: - - image: circleci/node:8.9.0 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/mongo:3.4.4 - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: npm install - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - # run tests! - - run: npm test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..40dc002 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: ci + +on: + push: + branches: [ "master", "main" ] + pull_request: + branches: [ "master", "main" ] + +jobs: + ci: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + node-version: [8.x, 9.x, 12.x, 14.x, 16.x] + + 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 ci + - run: npm test diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 0715afe..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,30 +0,0 @@ -# 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://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.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 ci - - run: npm test diff --git a/README.md b/README.md index 1485fe9..194b914 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Toy-Neural-Network-JS [![Build Status](https://circleci.com/gh/CodingTrain/Toy-Neural-Network-JS.png?&style=shield&circle-token=:circle-token)](https://circleci.com/gh/CodingTrain/Toy-Neural-Network-JS) +# Toy-Neural-Network-JS + +![ci](https://github.com/CodingTrain/Toy-Neural-Network-JS/actions/workflows/ci.yml/badge.svg) Neural Network JavaScript library for Coding Train tutorials From 91aca06e5cb4afae0dfd2f276218efe6ea773fbf Mon Sep 17 00:00:00 2001 From: mrdcvlsc Date: Sat, 23 Jul 2022 23:30:11 +0800 Subject: [PATCH 3/4] removed node version 9.x in ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40dc002..7515594 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [8.x, 9.x, 12.x, 14.x, 16.x] + node-version: [8.x, 12.x, 14.x, 16.x] steps: - uses: actions/checkout@v3 From 3766a5ca6891274e26b4b2a55df15939893f31fd Mon Sep 17 00:00:00 2001 From: mrdcvlsc Date: Sat, 23 Jul 2022 23:31:41 +0800 Subject: [PATCH 4/4] added node version 18 in ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7515594..cec827f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - node-version: [8.x, 12.x, 14.x, 16.x] + node-version: [8.x, 12.x, 14.x, 16.x, 18.x] steps: - uses: actions/checkout@v3