Skip to content

Commit

Permalink
ci: add remaining workflows from vite-electron-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
grantjbutler committed Feb 15, 2022
1 parent 06e0bea commit b4d5aba
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Linters
on:
push:
branches:
- main
paths:
- '**.js'
- '**.ts'
- '**.vue'
- 'package-lock.json'
- '.github/workflows/lint.yml'
pull_request:
paths:
- '**.js'
- '**.ts'
- '**.vue'
- 'package-lock.json'
- '.github/workflows/lint.yml'


defaults:
run:
shell: 'bash'

jobs:
eslint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16 # Need for npm >=7.7
cache: 'npm'

# TODO: Install not all dependencies, but only those required for this workflow
- name: Install dependencies
run: npm ci

- run: npm run lint
77 changes: 77 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Tests
on:
push:
branches:
- main
paths:
- 'packages/**'
- 'tests/**'
- 'package-lock.json'
- '.github/workflows/tests.yml'
pull_request:
paths:
- 'packages/**'
- 'tests/**'
- 'package-lock.json'
- '.github/workflows/tests.yml'

defaults:
run:
shell: 'bash'

jobs:

main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run test:main


preload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run test:preload


renderer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- run: npm ci
- run: npm run test:renderer


e2e:
if: false # disabled until we get some e2e tests added to the codebase.
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'npm'
- run: npm ci
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npx playwright install --with-deps chromium
- run: npm run test:e2e
39 changes: 39 additions & 0 deletions .github/workflows/typechecking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Typechecking
on:
push:
branches:
- main
paths:
- '**.ts'
- '**.vue'
- '**/tsconfig.json'
- 'package-lock.json'
- '.github/workflows/typechecking.yml'
pull_request:
paths:
- '**.ts'
- '**.vue'
- '**/tsconfig.json'
- 'package-lock.json'
- '.github/workflows/typechecking.yml'

defaults:
run:
shell: 'bash'

jobs:
typescript:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16 # Need for npm >=7.7
cache: 'npm'

# TODO: Install not all dependencies, but only those required for this workflow
- name: Install dependencies
run: npm ci

- run: npm run typecheck
44 changes: 44 additions & 0 deletions .github/workflows/update-electron-vendors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update Electon vendors versions
on:
push:
branches:
- main
paths:
- 'package-lock.json'


concurrency:
group: update-electron-vendors-${{ github.ref }}
cancel-in-progress: true


defaults:
run:
shell: 'bash'


jobs:
node-chrome:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16 # Need for npm >=7.7
cache: 'npm'

# TODO: Install not all dependencies, but only those required for this workflow
- name: Install dependencies
run: npm ci

- run: node ./scripts/update-electron-vendors.js

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
delete-branch: true
commit-message: Update electron vendors
branch: autoupdates/electron-vendors
title: Update electron vendors
body: Updated versions of electron vendors in `.electron-vendors.cache.json` and `.browserslistrc` files

0 comments on commit b4d5aba

Please sign in to comment.