Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: run test on contract changes #123

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,31 @@ name: release
on:
push:
tags:
- "v*.*.*"
- 'v*.*.*'

jobs:
crate:
name: crate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
run: |
rustup toolchain install 1.72 \
--profile minimal \
--target wasm32-unknown-unknown \
--no-self-update

- name: Cache dependencies
uses: Swatinem/rust-cache@v2

- name: Install Deps
run: make install-prod

- name: Publish hpl-interface
run: cargo publish --token ${{ secrets.CRATES_TOKEN }} --package hpl-interface

artifact:
permissions:
contents: write
Expand Down Expand Up @@ -42,10 +64,7 @@ jobs:
env:
ARTIFACT_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip

- name: Publish hpl-interface
run: cargo publish --token ${{ secrets.CRATES_TOKEN }} --package hpl-interface

- name: Release
- name: Release Artifact
uses: softprops/action-gh-release@v1
with:
files: |
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ name: test

on:
pull_request:
paths:
- 'contracts/**'
- 'packages/**'
- 'Cargo.toml'
push:
branches:
- "main"
- 'main'

jobs:
unit-test:
strategy:
fail-fast: true

name: unit-test
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -39,11 +43,11 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Install Rust
run: |
rustup toolchain install 1.72 \
Expand Down