chore(deps): update dependency eslint-plugin-react to v7.37.4 #2461
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 | |
on: | |
push: | |
branches: | |
- staging | |
- trying | |
- master | |
- v0.2.x | |
pull_request: | |
branches: | |
- staging | |
- trying | |
- master | |
- v0.2.x | |
jobs: | |
build: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x, 16.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn cache | |
uses: actions/cache@v3 | |
id: cache-yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.node-version }}-nodemodules- | |
- name: Install Dependencies | |
run: yarn | |
if: | | |
steps.cache-yarn-cache.outputs.cache-hit != 'true' || | |
steps.cache-node-modules.outputs.cache-hit != 'true' | |
- name: Create a mock .env file on ${{ matrix.node-version }} | |
run: | | |
echo "TOKEN_SECRET=$(openssl rand -hex 32)" > .env.local | |
echo "MONGODB_URI=mongodb://localhost:27017/naotimesdb" >> .env.local | |
echo "BOT_SOCKET_HOST=127.0.0.1" >> .env.local | |
echo "BOT_SOCKET_PORT=25670" >> .env.lcoal | |
echo "BOT_SOCKET_PORT=25670" >> .env.local | |
echo "BOT_SOCKET_PASSWORD=$(openssl rand -hex 16)" >> .env.local | |
- name: Build for ${{ matrix.node-version }} | |
run: | | |
yarn run prisma:generate | |
yarn run build-no-sentry | |
lint: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn cache | |
uses: actions/cache@v3 | |
id: cache-yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ matrix.node-version }}-nodemodules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.node-version }}-nodemodules- | |
- name: Install Dependencies | |
run: yarn | |
if: | | |
steps.cache-yarn-cache.outputs.cache-hit != 'true' || | |
steps.cache-node-modules.outputs.cache-hit != 'true' | |
- name: Lint | |
run: | | |
yarn run lint | |
yarn run type-check | |
# Trigger bors manually | |
end-success: | |
name: bors build finished | |
if: success() | |
runs-on: ubuntu-latest | |
needs: [build,lint] | |
steps: | |
- name: Mark the job as successful | |
run: exit 0 | |
end-failure: | |
name: bors build failed | |
if: | | |
!success() && | |
!contains(github.event.head_commit.message, 'skip ci') | |
runs-on: ubuntu-latest | |
needs: [build,lint] | |
steps: | |
- name: Mark the job as a failure | |
run: exit 1 |