Skip to content

feat(backend): event creation #19

feat(backend): event creation

feat(backend): event creation #19

Workflow file for this run

name: Contracts Coverage
on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
push:
branches: [ main ]
# Trigger the workflow on any pull request
pull_request:
permissions: read-all
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Set up Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "2.8.2"
- name: Set up SNForge
uses: foundry-rs/setup-snfoundry@v3
with:
starknet-foundry-version: "0.30.0"
- name: Set up cairo-coverage
run: curl -L https://raw.githubusercontent.com/software-mansion/cairo-coverage/main/scripts/install.sh | sh
- name: Run tests and generate report
run: cd onchain/ && snforge test --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}
credo:
name: Credo
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/[email protected]
with:
elixir-version: ${{ env.ELIXIR_VERSION_SPEC }}
otp-version: ${{ env.OTP_VERSION_SPEC }}
- name: Install dependencies
run: mix deps.get
- name: Compile dependencies
run: mix deps.compile
- name: Run tests
run: mix coveralls.json
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: coverage/excoveralls.json
token: ${{ secrets.CODECOV_TOKEN }}