Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: switch to GitHub Actions CI (#1299)
Drops AppVeyor and Travis CI.
- Loading branch information
Showing
10 changed files
with
177 additions
and
111 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macOS-latest, ubuntu-latest] | ||
node-installer: [npm, yarn] | ||
|
||
steps: | ||
- name: Fix git checkout line endings | ||
run: git config --global core.autocrlf input | ||
- uses: actions/checkout@v1 | ||
- name: Windows specific setup | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
curl -OLS https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311.exe | ||
.\wix311.exe /install /quiet /norestart | ||
npm config set node-gyp "$($env:GITHUB_WORKSPACE)\node_modules\node-gyp\bin\node-gyp.js" | ||
- name: Linux specific setup | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo add-apt-repository -y ppa:alexlarsson/flatpak | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends snapcraft flatpak-builder | ||
ci/install_runtimes.sh | ||
- name: Use Node.js 8.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 8.x | ||
- name: Cache node_modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build-${{ env.cache-name }}- | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- name: Install bolt | ||
shell: bash | ||
run: | | ||
case "$(uname -s)" in | ||
Windows*|CYGWIN*|MINGW*|MSYS*) BOLT_VERSION=0.21.2 ;; | ||
*) BOLT_VERSION=latest ;; | ||
esac | ||
npm install -g bolt@$BOLT_VERSION | ||
- name: Install | ||
run: bolt | ||
- name: Lint | ||
run: bolt lint | ||
- name: Build | ||
run: bolt build | ||
- name: Test on Windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
$wixToolsetBinPath = ";C:\Program Files (x86)\WiX Toolset v3.11\bin;" | ||
$env:PATH = $env:PATH + $wixToolsetBinPath | ||
[Environment]::SetEnvironmentVariable("Path", $env:PATH, [EnvironmentVariableTarget]::Machine) | ||
if ((Get-Command "light.exe" -ErrorAction SilentlyContinue) -eq $null) | ||
{ | ||
Write-Host "Unable to find light.exe in your PATH" | ||
} | ||
bolt coverage | ||
env: | ||
CI: true | ||
NODE_INSTALLER: ${{ matrix.node-installer }} | ||
- name: Test on macOS/Linux | ||
if: matrix.os != 'windows-latest' | ||
run: bolt coverage | ||
env: | ||
CI: true | ||
NODE_INSTALLER: ${{ matrix.node-installer }} | ||
DEBUG: electron-installer-snap:snapcraft | ||
- name: Codecov | ||
run: bolt codecov | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
docs: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
needs: build | ||
runs-on: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
- name: Cache node_modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.OS }}-build-${{ env.cache-name }}- | ||
${{ runner.OS }}-build- | ||
${{ runner.OS }}- | ||
- name: Install bolt | ||
shell: bash | ||
run: | | ||
case "$(uname -s)" in | ||
Windows*|CYGWIN*|MINGW*|MSYS*) BOLT_VERSION=0.21.2 ;; | ||
*) BOLT_VERSION=latest ;; | ||
esac | ||
npm install -g bolt@$BOLT_VERSION | ||
- name: Deploy docs | ||
run: ci/docs.sh | ||
env: | ||
NOW_TOKEN: ${{ secrets.NOW_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash -e | ||
|
||
# Pinned due to https://github.com/zeit/now/issues/2941 | ||
yarn global add now@16.1.2 | ||
yarn add --dev now@16.1.2 | ||
bolt | ||
bolt build | ||
yarn docs:deploy:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash -xe | ||
|
||
install_app() { | ||
local arch="$1" | ||
local app="$2" | ||
local branch=$3 | ||
install_flatpak "app/$app/$arch/$branch" | ||
} | ||
|
||
install_runtime() { | ||
local arch="$1" | ||
local runtime="$2" | ||
local version="$3" | ||
install_flatpak "runtime/${runtime}/$arch/$version" | ||
} | ||
|
||
install_flatpak() { | ||
local ref="$1" | ||
if [[ ! -d "$HOME/.local/share/flatpak/$ref" ]]; then | ||
flatpak install --user --no-deps --assumeyes "$ref" | ||
fi | ||
} | ||
|
||
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | ||
|
||
install_runtime x86_64 org.freedesktop.Sdk 1.6 | ||
install_runtime x86_64 org.freedesktop.Platform 1.6 | ||
install_app x86_64 org.electronjs.Electron2.BaseApp stable | ||
|
||
mkdir -p fakesnap/snap | ||
cp ci/snapcraft.yaml fakesnap/snap/ | ||
pushd fakesnap | ||
snapcraft pull desktop-gtk3 electron-deps | ||
popd | ||
rm -r fakesnap |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: electron-app | ||
version: '1.0.0' | ||
summary: App summary | ||
description: | | ||
App description | ||
grade: devel | ||
confinement: devmode | ||
|
||
parts: | ||
electron-deps: | ||
plugin: nil | ||
after: | ||
- desktop-gtk3 | ||
stage-packages: | ||
- libnotify4 | ||
- libnss3 | ||
- libpcre3 | ||
- libuuid1 | ||
- libxss1 | ||
- libxtst6 |