From 17b554179603040b09bcd31c5db0e6a996389313 Mon Sep 17 00:00:00 2001 From: talmobi Date: Thu, 26 Sep 2024 21:20:36 +0300 Subject: [PATCH] chore: gha for ubuntu-latest, macos-latest --- .github/workflows/macos-node.js.yml | 33 ++++++++++++++++++++++++ .github/workflows/ubuntu-node.js.yml | 33 ++++++++++++++++++++++++ .github/workflows/windows-node.js.yml | 37 +++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 .github/workflows/macos-node.js.yml create mode 100644 .github/workflows/ubuntu-node.js.yml create mode 100644 .github/workflows/windows-node.js.yml diff --git a/.github/workflows/macos-node.js.yml b/.github/workflows/macos-node.js.yml new file mode 100644 index 0000000..a1db716 --- /dev/null +++ b/.github/workflows/macos-node.js.yml @@ -0,0 +1,33 @@ +name: macos + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: macos-latest + + strategy: + matrix: + node-version: [20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Workaround to create TTY + run: | + npm install + npm run build --if-present + script -q "npm test" + diff --git a/.github/workflows/ubuntu-node.js.yml b/.github/workflows/ubuntu-node.js.yml new file mode 100644 index 0000000..4b5eb90 --- /dev/null +++ b/.github/workflows/ubuntu-node.js.yml @@ -0,0 +1,33 @@ +name: ubuntu + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Workaround to create TTY + run: | + npm install + npm run build --if-present + script -q -c "npm test" + diff --git a/.github/workflows/windows-node.js.yml b/.github/workflows/windows-node.js.yml new file mode 100644 index 0000000..97b3a77 --- /dev/null +++ b/.github/workflows/windows-node.js.yml @@ -0,0 +1,37 @@ +# not sure if it's possible to test this fully on windows that doesn't have +# similar TTY support? +########################## +# name: windows +# +# on: +# push: +# branches: [ "master" ] +# pull_request: +# branches: [ "master" ] +# +# jobs: +# build: +# +# runs-on: windows-latest +# +# strategy: +# matrix: +# node-version: [20.x] +# # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Use Node.js ${{ matrix.node-version }} +# uses: actions/setup-node@v1 +# with: +# node-version: ${{ matrix.node-version }} +# cache: 'npm' +# +# - name: Workaround to create TTY +# shell: pwsh +# run: | +# npm.cmd install +# npm.cmd run build --if-present +# winpty npm.cmd test +#