[wallet] refactor: loyalty v2 (but hidden for now) #1224
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: Eslint | |
on: | |
pull_request: | |
branches: | |
- "main" | |
- "staging" | |
- "dev" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
CI: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
registry-url: https://npm.pkg.github.com/ | |
- name: Install @metacraft/cli | |
run: npm i --location=global @metacraft/cli@latest | |
- name: Install yarn cli | |
run: corepack enable && corepack prepare yarn@4.1.1 --activate | |
- name: Set yarn version | |
run: yarn set version 4.1.1 | |
- name: Install dependencies | |
run: yarn | |
- name: Execute eslint | |
run: yarn lint | |
- name: Execute type check with tsc | |
run: yarn type-check | |
- name: Create .env.test file for testing | |
run: | | |
touch .env.test | |
echo "${{ secrets.WALLET_TEST_ENV_FILE }}" >> apps/wallet/.env.test | |
- name: Run test cases | |
run: yarn test | |
- name: Set branch name | |
id: branch | |
run: echo "::set-output name=BRANCH_NAME::${GITHUB_REF##*/}" | |
- name: Deploy | |
run: yarn deploy | |
if: github.ref == 'refs/heads/dev' |