]> git.wincent.com - wincent.git/commitdiff
feat: set up CI
authorGreg Hurrell <greg@hurrell.net>
Wed, 25 Mar 2020 17:14:31 +0000 (18:14 +0100)
committerGreg Hurrell <greg@hurrell.net>
Wed, 25 Mar 2020 17:16:26 +0000 (18:16 +0100)
.github/workflows/nodejs.yml [new file with mode: 0644]
package.json

diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
new file mode 100644 (file)
index 0000000..55a4ac0
--- /dev/null
@@ -0,0 +1,29 @@
+# Based on: https://github.com/actions/starter-workflows/blob/master/ci/node.js.yml
+
+name: Node.js CI
+
+on:
+  push:
+    branches: [master, pu]
+  pull_request:
+    branches: [master, pu]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        node-version: [12.x]
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Use Node.js ${{ matrix.node-version }}
+      uses: actions/setup-node@v1
+      with:
+        node-version: ${{ matrix.node-version }}
+    - run: yarn --frozen-lockfile
+    - run: yarn ci
+      env:
+        CI: true
index 021730118425d64a6625bc62112d8c69ce3689b1..0bc18ef312d398e226b95774442ad7f901ba89a5 100644 (file)
@@ -8,6 +8,7 @@
   "author": "Greg Hurrell <greg@hurrell.net>",
   "license": "Public Domain",
   "scripts": {
+    "ci": "yarn ci",
     "format:check": "npx prettier --check \"**/*.{js,json,ts}\" \"*.md\" roles/dotfiles/files/.zsh/liferay/bin/portool",
     "format": "npx prettier --write \"**/*.{js,json,ts}\" \"*.md\" roles/dotfiles/files/.zsh/liferay/bin/portool"
   },