Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/wojtekmaj/react-async-button. A button that handles Promises for your React app.
Something went wrong. Try again.
2.6 kB · 113 lines
YAML
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114# This workflow will do a clean install of node dependencies and run tests# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on: push: branches: ['*'] pull_request: branches: [main]
jobs: lint: name: Static code analysis runs-on: ubuntu-latest
steps: - name: Checkout uses: actions/checkout@v3
- name: Cache .yarn/cache uses: actions/cache@v3 env: cache-name: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }}
- name: Use Node.js uses: actions/setup-node@v3 with: node-version: '18'
- name: Enable Corepack run: corepack enable
- name: Install dependencies run: yarn --immutable env: HUSKY: 0
- name: Run tests run: yarn lint
prettier: name: Prettier runs-on: ubuntu-latest
steps: - name: Checkout uses: actions/checkout@v3
- name: Cache .yarn/cache uses: actions/cache@v3 env: cache-name: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }}
- name: Use Node.js uses: actions/setup-node@v3 with: node-version: '18'
- name: Enable Corepack run: corepack enable
- name: Install dependencies run: yarn --immutable env: HUSKY: 0
- name: Prettier run: yarn prettier
unit: name: Unit tests runs-on: ubuntu-latest
steps: - name: Checkout uses: actions/checkout@v3
- name: Cache .yarn/cache uses: actions/cache@v3 env: cache-name: yarn-cache with: path: .yarn/cache key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }}
- name: Use Node.js uses: actions/setup-node@v3 with: node-version: '18'
- name: Enable Corepack run: corepack enable
- name: Install dependencies run: yarn --immutable env: HUSKY: 0
- name: Run tests run: yarn jest