Skip to content

Commit

Permalink
Temporarily run Windows tests via GitHub Actions (flutter#3875)
Browse files Browse the repository at this point in the history
Until the infrastructure limitations that led to flutter#82032 are fixed, run basic Windows tests via GitHub Actions (which do have VS available) so that we aren't missing all Windows coverage.
  • Loading branch information
stuartmorgan committed May 11, 2021
1 parent 0e0c75b commit d160ed5
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/windows_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on: [push, pull_request]

jobs:
build_and_drive_windows:
runs-on: windows-2019
strategy:
matrix:
channel: ['master', 'stable']
# Disable fail-fast to get results from both channels even if one fails.
fail-fast: false

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
path: plugins
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
path: flutter
repository: flutter/flutter
ref: master
# Shallow clones don't work; see https://github.com/flutter/flutter/issues/18532
fetch-depth: 0
- name: Set up Flutter
run: |
# Add tags, which are also necessary for version checks to work.
git fetch origin +refs/tags/*:refs/tags/*
# Set channel
bin\flutter channel ${{matrix.channel}}
bin\flutter upgrade
# Enable desktop
bin\flutter config --enable-windows-desktop
# Add fluter to path.
echo "$env:GITHUB_WORKSPACE\flutter\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
working-directory: ${{ github.workspace }}/flutter
- name: Doctor
# Run doctor, for ease of debugging any issues.
run: flutter doctor -v
- name: Set up tools
run: dart pub get
working-directory: ${{ github.workspace }}/plugins/script/tool
- name: Build
run: |
dart run ./script/tool/lib/src/main.dart build-examples --windows --run-on-changed-packages
working-directory: ${{ github.workspace }}/plugins
- name: Drive
run: |
dart run ./script/tool/lib/src/main.dart drive-examples --windows --run-on-changed-packages
working-directory: ${{ github.workspace }}/plugins
4 changes: 2 additions & 2 deletions script/tool/lib/src/firebase_test_lab_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class FirebaseTestLabCommand extends PluginCommand {
help: 'The Firebase project name.',
);
argParser.addOption('service-key',
defaultsTo:
p.join(io.Platform.environment['HOME'], 'gcloud-service-key.json'));
defaultsTo: p.join(
io.Platform.environment['HOME'] ?? '/', 'gcloud-service-key.json'));
argParser.addOption('test-run-id',
defaultsTo: Uuid().v4(),
help:
Expand Down

0 comments on commit d160ed5

Please sign in to comment.