Skip to content

Commit

Permalink
add basci gha
Browse files Browse the repository at this point in the history
  • Loading branch information
0xverin committed Jun 5, 2024
1 parent 51a7544 commit 4f784bc
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: General CI

on:
push:
branches:
- dev
paths-ignore:
- "**/README.md"
pull_request:
branches:
- dev
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:

set-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: 18

fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install deps
run: |
npm install
- name: Fmt check
run: |
npm run fmt-check
compile:
runs-on: ubuntu-latest
needs:
- fmt
steps:
- uses: actions/checkout@v4

- name: Compile solidity
run: |
npm run compile
hardhat-test:
runs-on: ubuntu-latest
needs:
- compile

- uses: actions/checkout@v4

- name: Run hardhat test
run: |
npm run test:all
19 changes: 19 additions & 0 deletions .github/workflows/delete-branch-after-pr-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Delete branch after PR merge

on:
pull_request_target:
types:
- closed

jobs:
delete_branch_optionally:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: delete_branch
run: |
git push origin --delete "${{ github.head_ref }}"
echo "remote branch ${{ github.head_ref }} deleted"

0 comments on commit 4f784bc

Please sign in to comment.