From bf535d25d41136b82915347f237159c583ec6478 Mon Sep 17 00:00:00 2001 From: iChenLei <2470828450@qq.com> Date: Thu, 24 Jun 2021 12:10:27 +0800 Subject: [PATCH 1/9] chore: add empty github actions yaml --- .github/workflows/test.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 000000000..e69de29bb From 68752af9f8e6725693f194c640e73148bb5a6cc3 Mon Sep 17 00:00:00 2001 From: ChenLei Date: Tue, 29 Jun 2021 17:41:13 +0800 Subject: [PATCH 2/9] Update and rename test.yaml to ci.yaml Add gitlab actions ci.yml for better test infra for less.js project! --- .github/workflows/ci.yaml | 31 +++++++++++++++++++++++++++++++ .github/workflows/test.yaml | 0 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..a7fbc7295 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,31 @@ +# Github actions workflow name +name: Nodejs Test + +# Triggers the workflow on push or pull request events +on: [push, pull_request] + +jobs: + test: + name: unit test + # Test all popular platform + runs-on: [ubuntu-latest, macos-latest, windows-latest] + strategy: + matrix: + # Node LTS version + node: [10, 12, 14, 16] + steps: + # Configures the node version used on GitHub-hosted runners + - uses: actions/setup-node@v2 + with: + # The Node.js version to configure + node-version: ${{ matrix.node }} + + - name: Install npm dependencies + run: npm install + + - name: Print put node & npm version + # Output useful info for debugging. + run: node --version && npm --version + + - name: Run unit test + run: cd packages/less && npm test diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index e69de29bb..000000000 From ad5374e99fee86dc47a4069989fca3bbd38ac256 Mon Sep 17 00:00:00 2001 From: ChenLei Date: Tue, 29 Jun 2021 18:00:25 +0800 Subject: [PATCH 3/9] Update ci.yaml --- .github/workflows/ci.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7fbc7295..ab456a900 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,12 +7,14 @@ on: [push, pull_request] jobs: test: name: unit test - # Test all popular platform - runs-on: [ubuntu-latest, macos-latest, windows-latest] strategy: matrix: + # Use appveyor to test window platform + # If appveyor not work please add `windows-latest` to matrix.os array + os: [ubuntu-latest, macos-latest] # Node LTS version node: [10, 12, 14, 16] + runs-on: ${{ matrix.os }} steps: # Configures the node version used on GitHub-hosted runners - uses: actions/setup-node@v2 From 050f94e913740b7f4b73e99c04604472a81eb381 Mon Sep 17 00:00:00 2001 From: ChenLei Date: Tue, 29 Jun 2021 18:06:47 +0800 Subject: [PATCH 4/9] Update and rename ci.yaml to ci.yml --- .github/workflows/{ci.yaml => ci.yml} | 2 ++ 1 file changed, 2 insertions(+) rename .github/workflows/{ci.yaml => ci.yml} (90%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yml similarity index 90% rename from .github/workflows/ci.yaml rename to .github/workflows/ci.yml index ab456a900..9021f8ae5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ jobs: node: [10, 12, 14, 16] runs-on: ${{ matrix.os }} steps: + # Pull repo to test machine + - uses: actions/checkout@v2 # Configures the node version used on GitHub-hosted runners - uses: actions/setup-node@v2 with: From 0cc74ce71e71a3a4c002e31b78cf01469614beef Mon Sep 17 00:00:00 2001 From: ChenLei Date: Wed, 30 Jun 2021 16:04:23 +0800 Subject: [PATCH 5/9] Update 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 9021f8ae5..ab6352e7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: [push, pull_request] jobs: test: - name: unit test + name: 'Tests on ${{matrix.platform}} with node${{matrix.node}}' strategy: matrix: # Use appveyor to test window platform From fd3ef4661c6b06b10ee0e3ecf8027f57c34ef1f8 Mon Sep 17 00:00:00 2001 From: ChenLei Date: Wed, 30 Jun 2021 16:10:23 +0800 Subject: [PATCH 6/9] Update ci.yml --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab6352e7e..59acea14f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,14 +6,14 @@ on: [push, pull_request] jobs: test: - name: 'Tests on ${{matrix.platform}} with node${{matrix.node}}' + name: 'Tests on ${{matrix.os}} with node${{matrix.node}}' strategy: matrix: # Use appveyor to test window platform # If appveyor not work please add `windows-latest` to matrix.os array os: [ubuntu-latest, macos-latest] # Node LTS version - node: [10, 12, 14, 16] + node: [10, 12, 14] runs-on: ${{ matrix.os }} steps: # Pull repo to test machine From ab8681b8bc1a2a2c88a428365fb36288377cd13e Mon Sep 17 00:00:00 2001 From: ChenLei Date: Sat, 3 Jul 2021 10:40:44 +0800 Subject: [PATCH 7/9] Update ci.yml --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59acea14f..66b26fa48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,11 +9,10 @@ jobs: name: 'Tests on ${{matrix.os}} with node${{matrix.node}}' strategy: matrix: - # Use appveyor to test window platform - # If appveyor not work please add `windows-latest` to matrix.os array - os: [ubuntu-latest, macos-latest] - # Node LTS version - node: [10, 12, 14] + # Test all mainstream operating system + os: [ubuntu-latest, macos-latest, windows-latest] + # Latest four Nodejs LTS version + node: [10, 12, 14, 16] runs-on: ${{ matrix.os }} steps: # Pull repo to test machine From ef0aeca0fa23340b82d46459e73ec1e0be8ce97c Mon Sep 17 00:00:00 2001 From: ChenLei Date: Sat, 3 Jul 2021 11:00:31 +0800 Subject: [PATCH 8/9] Add npm cache --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66b26fa48..ef7679d69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,19 @@ jobs: with: # The Node.js version to configure node-version: ${{ matrix.node }} + + # Caching dependencies to speed up workflows + - name: Get npm cache directory + id: npm-cache-dir + run: | + echo "::set-output name=dir::$(npm config get cache)" + - uses: actions/cache@v2 + id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Install npm dependencies run: npm install From b526e40a756a8858d39cce5961e7ca2ff35e6ffc Mon Sep 17 00:00:00 2001 From: ChenLei Date: Sat, 3 Jul 2021 11:08:12 +0800 Subject: [PATCH 9/9] Delete unused travis-ci.org CI script yaml file --- .travis.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 38639ae60..000000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: node_js -node_js: - - "14" - - "12" - - "10" - - "8" -install: - - npm install -g grunt-cli - - travis_retry npm install -env: - global: - - secure: TrNVruWYaUK5ALga1y7wRY+MLjWJECUSCsBmKW5EUmIevOUxqHWu7M89FANKxstEeFRRAGH3QJbloRxnzIgh0U0ah5npE9XA1bYXGO5khoXeIyk7pNRfjIo8aEnJH1Vp8vWA6J6ovxdJ7lCFKEGvGKxGde50knVl7KFVVULlX2U= - - secure: Rzh+CEI7YRvvVkOruPE8Z0dkU0s13V6b6cpqbN72vxbJl/Jm5PUZkjTFJdkWJrW3ErhCKX6EC7XdGvrclqEA9WAqKzrecqCJYqTnw4MwqiAj6F9wqE/BqhoWg4xPxm0MK/7eJMvLCgjNpe+gc1CaeFJZkLSNWn6nOFke+vVlf9Q= -sudo: false