Skip to content

feat: GitHub Actions workflow attempt #1

feat: GitHub Actions workflow attempt

feat: GitHub Actions workflow attempt #1

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
tags-ignore:
- '*'
pull_request:
branches: [ master ]
jobs:
build:
# if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
if: "github.event_name == 'pull_request' || !contains(github.event.head_commit.message, 'skip ci')"
# runs-on: ubuntu-latest # / ubuntu-18.04 ... or ubuntu-16.04, ubuntu-20.04
# runs-on: macos-latest # / macos-10.15
# runs-on: windows-2016 # not window-latest / windows-2019, see https://github.com/edrlab/thorium-reader/issues/1591
runs-on: ${{ matrix.runson }}
strategy:
fail-fast: false
matrix:
# windows-arm
osarch: [windows-intel, macos-intel, macos-arm, linux-intel, linux-arm]
include:
- osarch: windows-intel
runson: windows-latest
# - osarch: windows-arm
# runson: windows-latest
- osarch: macos-intel
runson: macos-13
- osarch: macos-arm
runson: macos-latest
- osarch: linux-intel
runson: ubuntu-20.04
- osarch: linux-arm
runson: ubuntu-20.04
steps:
- run: 'echo "GITHUB_RUN_NUMBER: ${{ github.run_number }}"'
- run: 'echo "GITHUB_RUN_ID: ${{ github.run_id }}"'
- run: 'echo "GITHUB_SHA: ${{ github.sha }}"'
- name: Check sys arch
if: ${{ matrix.osarch != 'windows-intel' }}
run: echo "${{ matrix.osarch }}" && uname -m && arch
- name: Checkout
uses: actions/checkout@v4
- name: Git config global dump (post)
run: 'git config --global --list || echo NO_GIT_GLOBAL_CONFIG || true'
shell: bash
- name: Git config local dump (post)
run: 'git config --list || echo NO_GIT_GLOBAL_CONFIG || true'
shell: bash
- uses: actions/setup-node@v4
with:
node-version: '20'
#check-latest: true
- run: node --version && npm --version
- run: npm --global install npm@^10
- run: npm --version
- run: npm --global install yarn@^1
- run: yarn --version
- run: git --no-pager diff
- run: yarn install --frozen-lockfile
# - name: PR action
# if: ${{ github.event_name == 'pull_request' }}
# run: echo PR
- name: non-PR action, Windows
if: ${{ github.event_name != 'pull_request' && ( matrix.osarch == 'windows-intel' || matrix.osarch == 'windows-arm' ) }}
run: echo "${{ matrix.osarch }}" && yarn test && yarn test-cli && yarn test-electron && yarn test-electron-cli
- name: non-PR action, non-Windows
if: ${{ github.event_name != 'pull_request' && matrix.osarch != 'windows-intel' && matrix.osarch != 'windows-arm' }}
run: echo "${{ matrix.osarch }}" && yarn test && yarn test-cli && yarn test-electron && yarn test-electron-cli