Merge pull request #148 from ODGodinho/dependabot/npm_and_yarn/types/… #225
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: Ci Job | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request_target: | |
jobs: | |
review-and-test: | |
name: lint / tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [ 20 ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.version }} | |
registry-url: "https://npm.pkg.github.com/" | |
cache: yarn | |
- name: Yarn Install | |
run: yarn | |
- name: Playwright Install | |
run: yarn playwright install chromium | |
- if: ${{ github.event_name == 'pull_request' }} | |
name: Review Dog Pull Request | |
uses: reviewdog/action-eslint@v1 | |
with: | |
reporter: github-pr-review | |
github_token: ${{ secrets.GH_TOKEN }} | |
eslint_flags: '--ext .js,.jsx,.ts,.tsx,.json,.jsonc,.json5,.yml,.yaml,.xml,.txt,.svg,.properties,.gradle,.java,.cpp,.c,.cs,.html,.css,.groovy,.gitignore,.npmignore,.toml,.env,.example,.sample,.ini,.php,.bat,.powershell,.ps1,.sh,.bash,.eslintrc .' | |
fail_on_error: true | |
- name: Build Code | |
run: yarn build | |
- name: Run Tests | |
env: | |
USE_HEADLESS: "true" | |
run: "yarn test:ci" | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
verbose: true | |
- if: ${{ github.event_name == 'push' && vars.IS_PACKAGE == 'true' }} | |
name: Install semantic release | |
run: yarn global add semantic-release | |
- if: ${{ github.event_name == 'push' && vars.IS_PACKAGE == 'true' }} | |
name: Run semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: semantic-release |