Skip to content

refactor: abstract import and factory generation (#112) #35

refactor: abstract import and factory generation (#112)

refactor: abstract import and factory generation (#112) #35

Workflow file for this run

name: Build and test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
gravity:
name: Gravity tests
runs-on: ubuntu-latest
steps:
# Environment security
- name: Step Security
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
disable-sudo-and-containers: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
objects.githubusercontent.com:443
release-assets.githubusercontent:443
github.com:443
index.crates.io:443
static.crates.io:443
static.rust-lang.org:443
proxy.golang.org:443
# Checkout
# Most toolchains require checkout first
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# Language toolchains
- name: Install Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: stable
- name: Install Rust
uses: dtolnay/rust-toolchain@6d653acede28d24f02e3cd41383119e8b1b35921
with:
# We start by installing the stable toolchain but the
# `rust-toolchain.toml` file takes precendence
toolchain: stable
- name: Inspect toolchain versions
run: |
cargo -V
go version
# Workflow
- name: cargo build
run: cargo build --locked --verbose
env:
CARGO_TERM_COLOR: always
- name: cargo test
run: cargo test --locked --verbose
env:
CARGO_TERM_COLOR: always
- name: go test
run: |
go generate ./...
go test ./...
- name: run snapshot tests
run: cargo test --locked --verbose --test cli