Skip to content

Commit

Permalink
Merge pull request #11 from talmobi/gha-tests
Browse files Browse the repository at this point in the history
ubuntu-latest and macos-latest gha tests (can't get windows gha to work due to TTY issues)
  • Loading branch information
talmobi authored Sep 26, 2024
2 parents 7bc25fb + 17b5541 commit b369a90
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/macos-node.js.yml
Original file line number Diff line number Diff line change
@@ -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"
33 changes: 33 additions & 0 deletions .github/workflows/ubuntu-node.js.yml
Original file line number Diff line number Diff line change
@@ -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"
37 changes: 37 additions & 0 deletions .github/workflows/windows-node.js.yml
Original file line number Diff line number Diff line change
@@ -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
#

0 comments on commit b369a90

Please sign in to comment.