Skip to content

Commit

Permalink
Add rust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tupui committed Jul 14, 2024
1 parent 3e7a46d commit 15b67f0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/contract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test Contract

on:
push:
branches: [ main ]
pull_request:

workflow_dispatch:
# schedule:
# - cron: "0 6 * * *"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
RUST_BACKTRACE: 1

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Rust
run: rustup show

- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'main' }}

- name: Compile and tests
run: cargo test
8 changes: 5 additions & 3 deletions .github/workflows/test.yml → .github/workflows/events.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Tests using docker compose.
name: Test
name: Test Events

permissions:
contents: read

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

workflow_dispatch:
# schedule:
# - cron: "0 6 * * *"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help install prepare fmt clean build test build-release deploy contract_help
.PHONY: help install prepare rust-lint clean contract_build contract_test contract_deploy contract_help
.DEFAULT_GOAL := help
SHELL:=/bin/bash

Expand Down

0 comments on commit 15b67f0

Please sign in to comment.