Add Windows to GitHub Actions CI matrix

Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/741

Reviewed By: jknoxville

Differential Revision: D19371114

fbshipit-source-id: 07c6bd71e58011cc3fffa34354546eb773e3fc3d
This commit is contained in:
Anton Nikolaev
2020-01-14 03:51:23 -08:00
committed by Facebook Github Bot
parent 11e134e87c
commit 5fd8db294a
3 changed files with 9 additions and 3 deletions

View File

@@ -10,7 +10,7 @@
const fbjs = require('eslint-config-fbjs'); const fbjs = require('eslint-config-fbjs');
// enforces copyright header and @format directive to be present in every file // enforces copyright header and @format directive to be present in every file
const pattern = /^\*\n[\S\s]*Facebook[\S\s]* \* @format\n/; const pattern = /^\*\r?\n[\S\s]*Facebook[\S\s]* \* @format\r?\n/;
const prettierConfig = { const prettierConfig = {
requirePragma: true, requirePragma: true,

View File

@@ -5,11 +5,12 @@ on: [push, pull_request]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
node-version: [10.x, 12.x] node-version: [10.x, 12.x]
os: ['ubuntu-latest', 'windows-latest']
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
@@ -23,5 +24,9 @@ jobs:
run: yarn lint run: yarn lint
- name: test - name: test
run: yarn test run: yarn test
- name: build - name: build linux
if: matrix.os == 'ubuntu-latest'
run: yarn build --linux run: yarn build --linux
- name: build windows
if: matrix.os == 'windows-latest'
run: yarn build --win

View File

@@ -13,6 +13,7 @@ import fs from 'fs';
const validSerializedData = fs const validSerializedData = fs
.readFileSync('src/utils/__tests__/data/settings-v1-valid.json') .readFileSync('src/utils/__tests__/data/settings-v1-valid.json')
.toString() .toString()
.replace(/\r\n/g, '\n')
.trim(); .trim();
const validDeserializedData = const validDeserializedData =