Skip to content

feat: BCSC saved services #2561 #812

feat: BCSC saved services #2561

feat: BCSC saved services #2561 #812

Workflow file for this run

name: Code Quality
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled]
jobs:
lint:
runs-on: ubuntu-22.04
name: Lint+Format+Types
steps:
- name: Checkout bc-wallet-mobile
uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Setup NodeJS
uses: ./.github/workflows/actions/setup-node
- name: Cache app node_modules
uses: actions/cache@v3
with:
path: .yarn/cache
# Cache will be invalidated if yarn.lock changes
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install dependencies
working-directory: app
run: yarn install --immutable
- name: Cache bcsc-core build output
uses: actions/cache@v3
with:
path: packages/bcsc-core/lib
# Cache will be invalidated if any source file changes
key: ${{ runner.os }}-bcsc-core-build-${{ hashFiles('packages/bcsc-core/src/**') }}
restore-keys: |
${{ runner.os }}-bcsc-core-build-
# Note: The `bcsc-core` package must be built before type checking.
- name: Build bcsc-core
working-directory: packages/bcsc-core
run: yarn build
- name: Check style
working-directory: app
run: |
yarn prettier
echo "Run 'yarn prettier:fix to automatically fix formatting issues."
- name: LINTing
working-directory: app
run: yarn lint
- name: Check types
working-directory: app
# Note: To pass the type check, the `bcsc-core` package must be built first.
run: yarn typecheck
test:
runs-on: ubuntu-22.04
name: Testing
steps:
- name: Checkout bc-wallet-mobile
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup NodeJS
uses: ./.github/workflows/actions/setup-node
- name: Cache app node_modules
uses: actions/cache@v3
with:
path: .yarn/cache
# Cache will be invalidated if yarn.lock changes
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- name: Install dependencies
working-directory: app
run: yarn install --immutable
- name: Automated testing
run: yarn test