Adding settings/pro section #202
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
frontend-checks: | |
name: frontend checks | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Nostric | |
run: | | |
npm install | |
continue-on-error: false | |
- name: Prettier TypeScript check | |
run: | | |
npm run prettier | |
continue-on-error: false | |
- name: Prettier Svelte check | |
run: | | |
npm run prettier-svelte | |
continue-on-error: false | |
- name: ESLint TypeScript check | |
run: | | |
npm run lint | |
continue-on-error: false | |
- name: ESLint Svelte check | |
run: | | |
npm run lint-svelte | |
continue-on-error: false | |
backend-checks: | |
name: backend checks | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Nostric | |
run: | | |
npm install | |
continue-on-error: false | |
- name: Prettier check | |
run: | | |
npm run prettier-motoko | |
continue-on-error: false | |
- name: Install Mops | |
run: | | |
npm install -g ic-mops | |
continue-on-error: false | |
- name: Read DFX Version | |
run: | | |
# Define the path to your JSON file | |
json_file="dfx.json" | |
# Extract the dfx value using jq | |
dfx_version=$(jq -r '.dfx' "$json_file") | |
if [ -n "$dfx_version" ]; then | |
echo "Using DFX version: $dfx_version" | |
echo "DFX_VERSION=$dfx_version" >> $GITHUB_ENV | |
else | |
echo "Failed to extract DFX version from JSON, using the latest version" | |
echo "DFX_VERSION=latest" >> $GITHUB_ENV | |
fi | |
- uses: aviate-labs/setup-dfx@v0.2.6 | |
with: | |
dfx-version: ${{ env.DFX_VERSION }} | |
env: | |
DFX_IDENTITY_PEM: ${{ secrets.DFX_IDENTITY_PEM }} | |
- run: | | |
dfx start --clean --background | |
continue-on-error: false | |
- name: Unit tests | |
run: | | |
mops test | |
continue-on-error: false | |
integration-test: | |
name: integration test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Nostric | |
run: | | |
npm install | |
continue-on-error: false | |
- name: Install Mops | |
run: | | |
npm install -g ic-mops | |
continue-on-error: false | |
- name: Read DFX Version | |
run: | | |
# Define the path to your JSON file | |
json_file="dfx.json" | |
# Extract the dfx value using jq | |
dfx_version=$(jq -r '.dfx' "$json_file") | |
if [ -n "$dfx_version" ]; then | |
echo "Using the DFX version: $dfx_version" | |
echo "DFX_VERSION=$dfx_version" >> $GITHUB_ENV | |
else | |
echo "Failed to extract DFX version from JSON, using the latest version" | |
echo "DFX_VERSION=latest" >> $GITHUB_ENV | |
fi | |
- uses: aviate-labs/setup-dfx@v0.2.6 | |
with: | |
dfx-version: ${{ env.DFX_VERSION }} | |
env: | |
DFX_IDENTITY_PEM: ${{ secrets.DFX_IDENTITY_PEM }} | |
- run: | | |
dfx start --clean --background | |
continue-on-error: false | |
- name: Local deployment | |
run: | | |
bash deploy-local-ckbtc.sh | |
dfx deploy | |
continue-on-error: false |