Update .gitignore #174
This file contains hidden or 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: | |
- develop | |
- main | |
pull_request: | |
branches: | |
- develop | |
- main | |
permissions: read-all | |
env: | |
NODE_ENV: development | |
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }} | |
SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }} | |
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node_version: [18.12.0] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v4 | |
id: node | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Enable corepack | |
run: corepack enable | |
- name: Send Slack notification | |
uses: codedsolar/slack-action@v1 | |
if: ${{ github.event_name != 'pull_request' }} | |
id: slack | |
with: | |
status: in-progress | |
fields: | | |
{STATUS} | |
{REF} | |
Node.js: ${{ steps.node.outputs.node-version }} | |
- name: Install dependencies | |
run: yarn install --ignore-scripts | |
- name: Build | |
run: yarn build | |
env: | |
NODE_ENV: production | |
- name: Update Slack notification | |
uses: codedsolar/slack-action@v1 | |
if: ${{ github.event_name != 'pull_request' && always() }} | |
with: | |
status: ${{ job.status }} | |
timestamp: ${{ steps.slack.outputs.slack-timestamp }} | |
fields: | | |
{STATUS} | |
{REF} | |
Node.js: ${{ steps.node.outputs.node-version }} | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
node_version: [18.12.0] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v4 | |
id: node | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Enable corepack | |
run: corepack enable | |
- name: Send Slack notification | |
uses: codedsolar/slack-action@v1 | |
if: ${{ github.event_name != 'pull_request' }} | |
id: slack | |
with: | |
status: in-progress | |
fields: | | |
{STATUS} | |
{REF} | |
Node.js: ${{ steps.node.outputs.node-version }} | |
ESLint issues: Checking... | |
Prettier issues: Checking... | |
- name: Install dependencies | |
run: yarn install --ignore-scripts | |
- name: Lint using ESLint | |
run: yarn lint:eslint || true | |
- name: Output ESLint results | |
id: eslint | |
run: yarn ci:eslint || true | |
- name: Lint using Prettier | |
run: yarn lint:prettier || true | |
- name: Output Prettier results | |
id: prettier | |
run: yarn ci:prettier || true | |
- name: Check results | |
run: | | |
eslint_issues="${{ steps.eslint.outputs.issues }}" | |
prettier_issues="${{ steps.prettier.outputs.issues }}" | |
echo "Total ESLint issues: $eslint_issues" | |
echo "Total Prettier issues: $prettier_issues" | |
exit_code=1 | |
if [ "$eslint_issues" = '0' ] && [ "$prettier_issues" = '0' ]; then | |
exit_code=0 | |
fi | |
exit "$exit_code" | |
- name: Update Slack notification | |
uses: codedsolar/slack-action@v1 | |
if: ${{ github.event_name != 'pull_request' && always() }} | |
with: | |
status: ${{ job.status }} | |
timestamp: ${{ steps.slack.outputs.slack-timestamp }} | |
fields: | | |
{STATUS} | |
{REF} | |
Node.js: ${{ steps.node.outputs.node-version }} | |
ESLint issues: ${{ steps.eslint.outputs.issues || 'Skipped' }} | |
Prettier issues: ${{ steps.prettier.outputs.issues || 'Skipped' }} |