-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement CI/CD workflow using Github Actions (#60)
- Loading branch information
Showing
5 changed files
with
108 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Contracts CI | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/contracts.yaml" | ||
- "packages/snfoundry/**" | ||
- "package.json" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "packages/snfoundry/**" | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Install scarb | ||
uses: software-mansion/setup-scarb@v1 | ||
with: | ||
scarb-version: "2.8.4" | ||
scarb-lock: ./packages/snfoundry/contracts/Scarb.lock | ||
|
||
- name: Install snfoundry | ||
uses: foundry-rs/setup-snfoundry@v3 | ||
|
||
- name: Check Code Format | ||
run: | | ||
cd ./packages/snfoundry/contracts | ||
scarb fmt --check | ||
- name: Build Contracts | ||
run: | | ||
cd ./packages/snfoundry/contracts | ||
scarb build | ||
- name: Run Tests | ||
run: | | ||
cd ./packages/snfoundry/contracts | ||
scarb test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Next.js CI | ||
|
||
on: | ||
push: | ||
paths: | ||
- ".github/workflows/main.yaml" | ||
- "packages/nextjs/**" | ||
- "package.json" | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "packages/nextjs/**" | ||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
node: [lts/*] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Enable Corepack | ||
run: corepack enable | ||
|
||
- name: Setup node env | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Install dependencies (Next.js) | ||
run: | | ||
yarn config set nodeLinker node-modules | ||
yarn install --no-immutable | ||
working-directory: ./packages/nextjs | ||
|
||
- name: Install scarb | ||
uses: software-mansion/setup-scarb@v1 | ||
with: | ||
scarb-version: "2.8.4" | ||
scarb-lock: ./packages/snfoundry/contracts/Scarb.lock | ||
|
||
- name: Run Next.js Tests | ||
run: yarn test:nextjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters