From 3e17d293a7d320697eeb29c4a45c9a79973a2405 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Sat, 2 Nov 2019 17:41:56 +0800 Subject: [PATCH] build: move CI to GitHub actions (#451) * Update nodejs.yml * drop node 8 support * test on windows and macos * fix previous commit * proper matrix settings * Update nodejs.yml * use cache * only test master branch * tweaks * try to fix it on windows * xD * welp * test * test * try using a relative path * cannot get cache working, gg * fix line ending --- .gitattributes | 2 +- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.gitattributes b/.gitattributes index 176a458f9..6313b56c5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -* text=auto +* text=auto eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..26e60bcc8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: Node CI + +on: + pull_request: + push: + branches: + - master + paths-ignore: + - '**.md' + +jobs: + test: + name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + matrix: + node-version: [10.x, 12.x] + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: yarn + + - name: Test + run: yarn test + env: + CI: true