Summary: This previous attempt didn't work. Not even sure what happens now, it seems to just return the result of a boolean evaluation? Cool. Still haven't verified that this works in the release build but noticed that we do effectively the same in the build step. By upgrading to the same revision of the action we use and then switching from `&&` to simply `;`, we can be reasonably sure that this will work now. The alternative would be to switch to `pwsh` which appears to be the new name. `powershell` is the default shell and seems to be an older version without support for `&&`. I honestly never want to touch this or read about it again, so let's go with the simpler option. Pull Request resolved: https://github.com/facebook/flipper/pull/3289 Reviewed By: aigoncharov Differential Revision: D33582853 Pulled By: passy fbshipit-source-id: 7c70ff360a5c327139b6ecb5463e85883a2caf9d
90 lines
2.7 KiB
YAML
90 lines
2.7 KiB
YAML
name: Desktop Node CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
desktop-directory: ./desktop
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node-version: [14.x]
|
|
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
- uses: actions/cache@v2
|
|
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
- name: yarn install (with retry)
|
|
uses: nick-invision/retry@v2.6.0
|
|
with:
|
|
command: cd ${{env.desktop-directory}}; yarn
|
|
timeout_minutes: 30
|
|
max_attempts: 3
|
|
- name: lint
|
|
run: yarn lint
|
|
working-directory: ${{env.desktop-directory}}
|
|
- name: test
|
|
run: yarn test --coverage
|
|
working-directory: ${{env.desktop-directory}}
|
|
- name: coveralls
|
|
uses: coverallsapp/github-action@v1.1.2
|
|
continue-on-error: true
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
base-path: ${{env.desktop-directory}}
|
|
path-to-lcov: ${{env.desktop-directory}}/coverage/lcov.info
|
|
- name: build linux
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: yarn build --linux
|
|
working-directory: ${{env.desktop-directory}}
|
|
- name: build macos
|
|
if: matrix.os == 'macos-latest'
|
|
run: yarn build --mac --mac-dmg
|
|
working-directory: ${{env.desktop-directory}}
|
|
- name: build windows
|
|
if: matrix.os == 'windows-latest'
|
|
run: yarn build --win
|
|
working-directory: ${{env.desktop-directory}}
|
|
- name: upload linux artifact
|
|
uses: actions/upload-artifact@v1
|
|
if: matrix.os == 'ubuntu-latest'
|
|
with:
|
|
name: Flipper-linux.zip
|
|
path: dist/Flipper-linux.zip
|
|
- name: upload windows artifact
|
|
uses: actions/upload-artifact@v1
|
|
if: matrix.os == 'windows-latest'
|
|
with:
|
|
name: Flipper-win.zip
|
|
path: dist/Flipper-win.zip
|
|
- name: upload mac zip artifact
|
|
uses: actions/upload-artifact@v1
|
|
if: matrix.os == 'macos-latest'
|
|
with:
|
|
name: Flipper-mac.zip
|
|
path: dist/Flipper-mac.zip
|
|
- name: upload mac dmg artifact
|
|
uses: actions/upload-artifact@v1
|
|
if: matrix.os == 'macos-latest'
|
|
with:
|
|
name: Flipper-mac.dmg
|
|
path: dist/Flipper-mac.dmg
|