Skip to content

SKIP_ENV_VALIDATION #952

SKIP_ENV_VALIDATION

SKIP_ENV_VALIDATION #952

Workflow file for this run

name: CI
on: push
jobs:
lintfix:
name: Lint and fix
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: πŸš€ Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: 🎯 Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: πŸ—οΈ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: πŸ“¦ Setup pnpm - Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false
- name: πŸ“¦ Setup pnpm - Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: πŸ“¦ Setup pnpm - Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: πŸ“¦ Install dependencies
run: pnpm install
- name: πŸ†• Check if migrations are up to date
run: pnpm run db:generate
- name: 🚨 Fail if new migrations are generated
uses: NathanielHill/fail-if-changes@master
- name: πŸ”¦ Run lint
run: pnpm lint --fix
- name: πŸ–ŒοΈ Run format
run: pnpm format
- name: 🍾 Commit & Push changes
uses: actions-js/push@master
with:
message: 'chore: Auto-fix lint errors'
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
test-integration:
name: Test integration
runs-on: ubuntu-latest
steps:
- name: πŸš€ Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: 🎯 Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: πŸ—οΈ Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: πŸ“¦ Setup pnpm - Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false
- name: πŸ“¦ Setup pnpm - Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: πŸ“¦ Setup pnpm - Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: πŸ“¦ Install dependencies
run: pnpm install
- name: πŸ§ͺ Run test
run: pnpm test:integration