Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions #1

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
21 changes: 13 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ prod ]
branches: [ main ]
pull_request:
branches: [ prod ]
branches: [ main ]

jobs:
build:
Expand All @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -26,7 +26,12 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: yarn lint
- run: yarn test
- run: yarn build --if-present
- run: yarn
- name: Create env file
run: |
touch .env
echo NEXT_PUBLIC_WORDPRESS_URL=${{ secrets.PUBLIC_WORDPRESS_URL }} >> .env
cat .env
# - run: yarn build
# - run: yarn lint
- run: yarn test:ci
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"test": "jest --watch",
"test:ci": "jest --",
"coverage": "jest --collectCoverage --",
"lint": "next lint",
"svg": "svgr -d src/components/icons src/components/icons/svgs"
Expand Down