Skip to content

build(deps): bump schemars from 0.8.15 to 0.8.16 #268

build(deps): bump schemars from 0.8.15 to 0.8.16

build(deps): bump schemars from 0.8.15 to 0.8.16 #268

Workflow file for this run

name: Run property-based tests
on:
pull_request:
merge_group:
types: [checks_requested]
schedule:
# Run every midnight UTC
- cron: "0 0 * * *"
workflow_dispatch: # manually triggered
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
generate-matrix:
name: Generate Matrix
runs-on: ubuntu-latest
outputs:
networks: ${{ steps.generate-matrix.outputs.networks }}
build_tag: ${{ steps.generate-matrix.outputs.build_tag }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Generate network matrix
id: generate-matrix
run: |
NETWORKS=$(ls networks | jq -R -s -c '. | gsub(".yaml"; "") | split("\n")[:-1]')
echo "Networks:"
echo ${NETWORKS}
echo "networks=${NETWORKS}" >> $GITHUB_OUTPUT
# Choose unique name for this build
BUILD_TAG="$(echo ${{ github.sha }} | head -c 8)-${{ github.run_id }}"
echo "Build tag:"
echo ${BUILD_TAG}
echo "build_tag=${BUILD_TAG}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
publish-property:
name: Build/Publish 'ceramic-tests-property' Image
runs-on: ubuntu-latest
needs:
- generate-matrix
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Public ECR
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: us-east-1
- name: Cache cargo
uses: actions/cache@v3
with:
path: cargo-cache
key: cargo-cache-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
cargo-cache-${{ github.ref_name }}
cargo-cache
- name: Inject cargo-cache into docker
run: |
mkdir -p cargo-cache
cd cargo-cache
../ci-scripts/inject_docker_mount_cache.sh
- name: Build and Publish
run: make BUILD_TAG=${{ needs.generate-matrix.outputs.build_tag }} publish-tests-property
- name: Extact cargo-cache from docker
run: |
cd cargo-cache
../ci-scripts/extract_docker_mount_cache.sh
build-driver:
name: Build 'hermetic-driver' binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
# The prefix cache key, this can be changed to start a new cache manually.
# default: "v0-rust"
prefix-key: v0
# Cache only the cargo registry
cache-targets: false
- uses: mozilla-actions/sccache-action@v0.0.3
- name: Build Tester
run: make BUILD_PROFILE=release driver
- uses: actions/upload-artifact@master
with:
name: hermetic-driver
path: ./target/release/hermetic-driver
retention-days: 1
run-tests:
name: Test
runs-on: ubuntu-latest
needs:
- generate-matrix
- publish-property
- build-driver
strategy:
fail-fast: false
matrix:
networks: ${{ fromJSON(needs.generate-matrix.outputs.networks) }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Setup GKE auth
uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.GKE_SA_KEY }}
-
name: Get GKE credentials
uses: 'google-github-actions/get-gke-credentials@v1'
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
- uses: actions/download-artifact@master
with:
name: hermetic-driver
path: ./bin
-
name: Test ${{ matrix.networks }}
run: |
export BUILD_TAG=${{ needs.generate-matrix.outputs.build_tag }}
export TEST_NETWORK=./networks/${{ matrix.networks }}.yaml
chmod +x ./bin/hermetic-driver
make HERMETIC_CMD=./bin/hermetic-driver prop-test
collect-results:
name: Property Test Results
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [run-tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}