Try actions-rs build+test, gcloud build is an app not an action

This commit is contained in:
Deirdre Connolly 2020-05-14 16:31:01 -04:00 committed by Deirdre Connolly
parent c30a683bac
commit 77b42d2048
1 changed files with 41 additions and 13 deletions

View File

@ -10,20 +10,48 @@ on:
jobs:
build:
name: Google Cloud Build
runs-on: ubuntu-latest
# build:
# name: Google Cloud Build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
# with:
# version: '275.0.0'
# service_account_key: ${{ secrets.GCLOUD_AUTH }}
# - name: Build, Test, Push to GCR
# run: |
# BRANCH_NAME=$GITHUB_REPOSITORY/$(expr $GITHUB_REF : '.*/\(.*\)') && \
# BRANCH_NAME=${BRANCH_NAME,,} && \
# gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME
test:
name: Build and test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@master
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '275.0.0'
service_account_key: ${{ secrets.GCLOUD_AUTH }}
- name: Build, Test, Push to GCR
run: |
BRANCH_NAME=$GITHUB_REPOSITORY/$(expr $GITHUB_REF : '.*/\(.*\)') && \
BRANCH_NAME=${BRANCH_NAME,,} && \
gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --release
grcov:
name: Code Coverage