mirror of
https://github.com/selfxyz/self.git
synced 2026-02-21 03:00:36 -05:00
* Add Prettier check for code formatting in contracts workflow * Update contracts workflow: remove unused checkout action and fix build step name * Run formatter * Run lint fix
44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: Self Contracts CI/CD
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- main
|
|
paths:
|
|
- 'contracts/**'
|
|
- 'common/**'
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
- main
|
|
paths:
|
|
- 'contracts/**'
|
|
- 'common/**'
|
|
jobs:
|
|
test_contracts:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-latest
|
|
environment: development
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set Node.js 20.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: Install Dependencies
|
|
uses: ./.github/actions/yarn-install
|
|
- name: Prettier Check - Code Formatting
|
|
run: yarn prettier:check
|
|
working-directory: ./contracts
|
|
- name: Build Common Dependencies
|
|
run: yarn workspace @selfxyz/common build
|
|
- name: Build Contracts
|
|
run: yarn build
|
|
working-directory: ./contracts
|
|
- name: Run Tests (Contracts)
|
|
working-directory: ./contracts
|
|
# skip until they get fixed
|
|
if: false
|
|
run: yarn test
|