Try actions-rs build+test, gcloud build is an app not an action
This commit is contained in:
parent
c30a683bac
commit
77b42d2048
|
@ -10,20 +10,48 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
# build:
|
||||||
name: Google Cloud Build
|
# name: Google Cloud Build
|
||||||
runs-on: ubuntu-latest
|
# 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:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@v1
|
||||||
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
version: '275.0.0'
|
toolchain: stable
|
||||||
service_account_key: ${{ secrets.GCLOUD_AUTH }}
|
override: true
|
||||||
- name: Build, Test, Push to GCR
|
- name: cargo fetch
|
||||||
run: |
|
uses: actions-rs/cargo@v1
|
||||||
BRANCH_NAME=$GITHUB_REPOSITORY/$(expr $GITHUB_REF : '.*/\(.*\)') && \
|
with:
|
||||||
BRANCH_NAME=${BRANCH_NAME,,} && \
|
command: fetch
|
||||||
gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME
|
- 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:
|
grcov:
|
||||||
name: Code Coverage
|
name: Code Coverage
|
||||||
|
|
Loading…
Reference in New Issue