Enable Web tests and make sure to install right channel (#390)

This commit is contained in:
Vyacheslav Egorov 2020-11-04 08:33:18 +01:00 committed by GitHub
parent 3a1c57530f
commit 4d55137ef4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 2 deletions

View File

@ -50,12 +50,30 @@ jobs:
matrix: matrix:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [stable, dev] sdk: [stable, dev]
platform: [vm, chrome]
exclude:
# We only run Chrome tests on Linux. No need to run them
# on Windows and Mac because they are platform independent.
- os: windows-latest
platform: chrome
- os: macos-latest
platform: chrome
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: cedx/setup-dart@v2 - uses: cedx/setup-dart@v2
with:
release-channel: ${{ matrix.sdk }}
- name: Report version - name: Report version
run: dart --version run: dart --version
- name: Install grpcwebproxy
if: ${{ matrix.platform == 'chrome' }}
run: |
./tool/install-grpcwebproxy.sh
echo "/tmp/grpcwebproxy" >> $GITHUB_PATH
env:
MATRIX_OS: ${{ matrix.os }}
shell: bash
- name: Install dependencies - name: Install dependencies
run: dart pub get run: dart pub get
- name: Run tests - name: Run tests
run: dart test run: dart test --platform ${{ matrix.platform }}

View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
set -ex
VERSION=v0.13.0 VERSION=v0.13.0
SUFFIX= SUFFIX=
WGET=wget
case $TRAVIS_OS_NAME in case $TRAVIS_OS_NAME in
linux) linux)
@ -16,9 +19,23 @@ case $TRAVIS_OS_NAME in
;; ;;
esac esac
case $MATRIX_OS in
ubuntu-latest)
VARIANT=linux-x86_64
;;
macos-latest)
VARIANT=osx-x86_64
;;
windows-latest)
VARIANT=win64.exe
SUFFIX=.exe
WGET=C:/msys64/usr/bin/wget.exe
;;
esac
BINARY=grpcwebproxy-${VERSION}-${VARIANT} BINARY=grpcwebproxy-${VERSION}-${VARIANT}
wget https://github.com/improbable-eng/grpc-web/releases/download/${VERSION}/${BINARY}.zip -O /tmp/grpcwebproxy.zip ${WGET} https://github.com/improbable-eng/grpc-web/releases/download/${VERSION}/${BINARY}.zip -O /tmp/grpcwebproxy.zip
rm -rf /tmp/grpcwebproxy rm -rf /tmp/grpcwebproxy
mkdir /tmp/grpcwebproxy mkdir /tmp/grpcwebproxy
cd /tmp/grpcwebproxy cd /tmp/grpcwebproxy