From 77b42d2048921ada3c75a4634f900a3978a9ec23 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Thu, 14 May 2020 16:31:01 -0400 Subject: [PATCH] Try actions-rs build+test, gcloud build is an app not an action --- .github/workflows/main.yml | 54 +++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6b851bcaa..9e5be2e76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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