Skip to content

Transition noir contract to parser v2 #107

Transition noir contract to parser v2

Transition noir contract to parser v2 #107

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
IMAGE_NAME: "cachecash"
AR_REPO_LOCATION: "europe-west1-docker.pkg.dev"
AR_URL: "hyli-shared-all/apps"
SERVICE_ACCOUNT: "github-actions-service-account@hyle-413414.iam.gserviceaccount.com"
WORKLOAD_IDENTITY_PROVIDER: ""
jobs:
rust:
name: Rust Checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Cache cargo build artifacts
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo test
run: cargo test --workspace --all-targets
frontend:
name: Frontend Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version-file: .bun-version
- name: Install dependencies
working-directory: front
run: bun install --frozen-lockfile
- name: Build frontend
working-directory: front
run: bun run build
docker:
name: Docker Build
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
strategy:
matrix:
suffix:
- server
- ui
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.AR_REPO_LOCATION }}/${{ env.AR_URL }}/${{ env.IMAGE_NAME }}-${{ matrix.suffix }}
tags: |
type=sha
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
- name: Google Auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: "projects/493106494045/locations/global/workloadIdentityPools/hyli-all-pool/providers/hyli-github-provider"
service_account: "ci-builder-sa@hyli-shared-all.iam.gserviceaccount.com"
- name: Docker Auth (Google Artifact Registry)
id: docker-auth
run: |
gcloud auth configure-docker ${{ env.AR_REPO_LOCATION }}
- name: Build and push ${{ matrix.suffix }} image
uses: docker/build-push-action@v6
with:
push: true
context: .
file: Dockerfile.${{ matrix.suffix }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}