Openstatus www.openstatus.dev

Add GitHub actions (#70)

* add github linting workflow

* trigger action on all branches

* use pnpm package manager

* add linting and format check scripts

* install dependencies before trying to run scripts

* update versions of packages

* 🚀 update action

---------

Co-authored-by: Thibault Le Ouay <thibaultleouay@gmail.Com>

authored by

Kelvin Amoaba
Thibault Le Ouay
and committed by
GitHub
2820f343 aa612ca4

+72 -1
+69
.github/workflows/lint.yml
··· 1 + # https://github.com/kentcdodds/kentcdodds.com/blob/main/.github/workflows/deployment.yml 2 + name: Code Check 3 + on: 4 + push: 5 + branches: 6 + - "*" 7 + pull_request: {} 8 + 9 + concurrency: 10 + group: ${{ github.job }}-${{ github.ref }} 11 + cancel-in-progress: true 12 + 13 + jobs: 14 + lint: 15 + name: ⬣ ESLint 16 + runs-on: ubuntu-latest 17 + timeout-minutes: 15 18 + env: 19 + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} 20 + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} 21 + steps: 22 + - name: ⬇️ Checkout repo 23 + uses: actions/checkout@v3 24 + 25 + - name: Set up pnpm 26 + uses: pnpm/action-setup@v2 27 + with: 28 + version: 8 29 + 30 + - name: ⎔ Setup node 31 + uses: actions/setup-node@v3 32 + with: 33 + node-version: 18 34 + cache: "pnpm" 35 + 36 + - name: 📥 Download deps 37 + run: pnpm install 38 + 39 + - name: 🔬 Lint 40 + run: pnpm lint:strict 41 + 42 + prettier: 43 + name: 💅 Prettier 44 + runs-on: ubuntu-latest 45 + timeout-minutes: 15 46 + 47 + env: 48 + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} 49 + TURBO_TEAM: ${{ secrets.TURBO_TEAM }} 50 + steps: 51 + - name: ⬇️ Checkout repo 52 + uses: actions/checkout@v3 53 + 54 + - name: Set up pnpm 55 + uses: pnpm/action-setup@v2 56 + with: 57 + version: 8 58 + 59 + - name: ⎔ Setup node 60 + uses: actions/setup-node@v3 61 + with: 62 + node-version: 18 63 + cache: "pnpm" 64 + 65 + - name: 📥 Download deps 66 + run: pnpm install 67 + 68 + - name: 💅 Prettier check 69 + run: pnpm prettier
+3 -1
package.json
··· 4 4 "build": "turbo run build", 5 5 "dev": "turbo run dev", 6 6 "lint": "turbo run lint", 7 + "lint:strict": "eslint --max-warnings=0 apps/**/*.{ts,tsx}", 7 8 "format": "prettier --write \"**/*.{ts,tsx,md}\"", 9 + "format:check": "prettier -c \"**/*.{ts,tsx,md}\"", 8 10 "tsc": "tsc" 9 11 }, 10 12 "pnpm": { ··· 30 32 }, 31 33 "packageManager": "pnpm@8.6.10", 32 34 "name": "openstatus" 33 - } 35 + }