Skip to content

Secret network code #36

Secret network code

Secret network code #36

Workflow file for this run

name: Test contract
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
jobs:
test-contract:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: dtolnay/[email protected]
with:
target: wasm32-unknown-unknown
components: rustfmt, clippy
- run: cargo test
build-contract:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: dtolnay/[email protected]
with:
target: wasm32-unknown-unknown
components: rustfmt, clippy
- run: RUSTFLAGS='-C link-arg=-s' cargo build --release --target wasm32-unknown-unknown --locked
build-contract-in-docker:
env:
IMAGE_NAME: initc3/tee-offchain
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set Short SHA
id: vars
run: echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
target: contract.wasm.gz
builder: ${{ steps.buildx.outputs.name }}
tags: |
${{ env.IMAGE_NAME }}:${{ steps.vars.outputs.short_sha }},
${{ env.IMAGE_NAME }}:latest,