-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from CamposBruno/fix/ci
Diferent workflows for test/build/release
- Loading branch information
Showing
3 changed files
with
89 additions
and
15 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,36 @@ | ||
name: Unit tests workflow | ||
on: push | ||
|
||
jobs: | ||
build-test: | ||
name: "Build and Test" | ||
runs-on: ubuntu-latest | ||
environment: testnet #change to mainnet before production | ||
|
||
strategy: | ||
matrix: | ||
node-version: ['20.x'] | ||
|
||
env: | ||
RPC_URL: ${{ secrets.RPC_URL }} | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install Yarn | ||
run: npm install --global yarn | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Compile | ||
run: yarn run compile | ||
|
||
- name: Run Tests | ||
run: yarn run 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
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,41 @@ | ||
name: Release Workflow | ||
|
||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
build-test-deploy: | ||
runs-on: ubuntu-latest | ||
environment: testnet #change to mainnet before production | ||
|
||
strategy: | ||
matrix: | ||
node-version: ['20.x'] | ||
|
||
env: | ||
RPC_URL: ${{ secrets.RPC_URL }} | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install Yarn | ||
run: npm install --global yarn | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Compile | ||
run: yarn run compile | ||
|
||
- name: Run Tests | ||
run: yarn run test | ||
|
||
- name: Run Deploy | ||
run: yarn run deploy --network testnet #change to mainnet before production |