misc/ github actions on 14.x, 16.x, 17.x

This commit is contained in:
Maxime GRIS
2021-11-17 16:21:09 +01:00
parent c5096fae98
commit 4fe8c2cac2
3 changed files with 167 additions and 167 deletions

View File

@@ -1,52 +1,52 @@
# This is a basic workflow to help you get started with Actions # This is a basic workflow to help you get started with Actions
name: 'MacOS Build' name: 'MacOS Build'
# Controls when the action will run. # Controls when the action will run.
on: on:
# Triggers the workflow on push or pull request events but only for the master branch # Triggers the workflow on push or pull request events but only for the master branch
push: push:
branches: branches:
- master - master
pull_request: pull_request:
branches: branches:
- master - master
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
build: build:
strategy: strategy:
matrix: matrix:
node-version: [14.x, 15.x, 16.x] node-version: [14.x, 16.x, 17.x]
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Cache node modules - name: Cache node modules
uses: actions/cache@v2 uses: actions/cache@v2
env: env:
cache-name: cache-node-modules cache-name: cache-node-modules
with: with:
# npm cache files are stored in `~/.npm` on Linux/macOS # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- ${{ runner.os }}-build-
${{ runner.os }}- ${{ runner.os }}-
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Install Dependencies - name: Install Dependencies
run: npm i run: npm i
- name: Check lint - name: Check lint
run: npm run lint run: npm run lint
- name: Build the app - name: Build the app
run: npm run electron:build run: npm run electron:build

View File

@@ -1,63 +1,63 @@
# This is a basic workflow to help you get started with Actions # This is a basic workflow to help you get started with Actions
name: 'Linux Build' name: 'Linux Build'
# Controls when the action will run. # Controls when the action will run.
on: on:
# Triggers the workflow on push or pull request events but only for the master branch # Triggers the workflow on push or pull request events but only for the master branch
push: push:
branches: branches:
- master - master
pull_request: pull_request:
branches: branches:
- master - master
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
build: build:
strategy: strategy:
matrix: matrix:
node-version: [14.x, 15.x, 16.x] node-version: [14.x, 16.x, 17.x]
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Cache node modules - name: Cache node modules
uses: actions/cache@v2 uses: actions/cache@v2
env: env:
cache-name: cache-node-modules cache-name: cache-node-modules
with: with:
# npm cache files are stored in `~/.npm` on Linux/macOS # npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- ${{ runner.os }}-build-
${{ runner.os }}- ${{ runner.os }}-
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Install Dependencies - name: Install Dependencies
run: npm i run: npm i
- name: Check lint - name: Check lint
run: npm run lint run: npm run lint
- name: Build the app - name: Build the app
run: npm run electron:build run: npm run electron:build
- name: Run headless unit test - name: Run headless unit test
uses: GabrielBB/xvfb-action@v1 uses: GabrielBB/xvfb-action@v1
with: with:
run: npm test run: npm test
- name: Run headless e2e test - name: Run headless e2e test
uses: GabrielBB/xvfb-action@v1 uses: GabrielBB/xvfb-action@v1
with: with:
run: npm run e2e run: npm run e2e

View File

@@ -1,52 +1,52 @@
# This is a basic workflow to help you get started with Actions # This is a basic workflow to help you get started with Actions
name: 'Windows Build' name: 'Windows Build'
# Controls when the action will run. # Controls when the action will run.
on: on:
# Triggers the workflow on push or pull request events but only for the master branch # Triggers the workflow on push or pull request events but only for the master branch
push: push:
branches: branches:
- master - master
pull_request: pull_request:
branches: branches:
- master - master
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
build: build:
strategy: strategy:
matrix: matrix:
node-version: [14.x, 15.x, 16.x] node-version: [14.x, 16.x, 17.x]
# The type of runner that the job will run on # The type of runner that the job will run on
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Cache node modules - name: Cache node modules
uses: actions/cache@v2 uses: actions/cache@v2
env: env:
cache-name: cache-node-modules cache-name: cache-node-modules
with: with:
# npm cache files are stored in `~/.npm` # npm cache files are stored in `~/.npm`
path: ~/.npm path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build- ${{ runner.os }}-build-
${{ runner.os }}- ${{ runner.os }}-
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Install Dependencies - name: Install Dependencies
run: npm i run: npm i
- name: Check lint - name: Check lint
run: npm run lint run: npm run lint
- name: Build the app - name: Build the app
run: npm run electron:build run: npm run electron:build