fix: incorrect margins #30189
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: Main | |
on: | |
push: | |
branches: [main, feature/*] | |
pull_request: | |
branches: [main, feature/*] | |
merge_group: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch other branches | |
if: ${{ github.event_name == 'pull_request' }} | |
run: git fetch --no-tags --prune --depth=5 origin $GITHUB_BASE_REF | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: node-modules-${{ matrix.node-version }}- | |
- name: NPM Install | |
run: npm install --silent | |
- name: generate prisma imports | |
uses: mansagroup/nrwl-nx-action@v3 | |
with: | |
targets: prisma-generate | |
all: true | |
parallel: 1 | |
env: | |
DISABLE_ERD: true | |
- name: Install Doppler | |
run: | | |
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg | |
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | sudo apt-key add - | |
echo "deb https://packages.doppler.com/public/cli/deb/debian any-version main" | sudo tee /etc/apt/sources.list.d/doppler-cli.list | |
sudo apt-get update && sudo apt-get -y install doppler | |
- name: fetch-secrets and build | |
uses: mansagroup/nrwl-nx-action@v3 | |
env: | |
DOPPLER_API_ANALYTICS_TOKEN: ${{ secrets.DOPPLER_API_ANALYTICS_TOKEN }} | |
DOPPLER_API_GATEWAY_TOKEN: ${{ secrets.DOPPLER_API_GATEWAY_TOKEN }} | |
DOPPLER_API_JOURNEYS_TOKEN: ${{ secrets.DOPPLER_API_JOURNEYS_TOKEN }} | |
DOPPLER_API_LANGUAGES_TOKEN: ${{ secrets.DOPPLER_API_LANGUAGES_TOKEN }} | |
DOPPLER_API_USERS_TOKEN: ${{ secrets.DOPPLER_API_USERS_TOKEN }} | |
DOPPLER_API_MEDIA_TOKEN: ${{ secrets.DOPPLER_API_MEDIA_TOKEN }} | |
DOPPLER_ARCLIGHT_TOKEN: ${{ secrets.DOPPLER_ARCLIGHT_TOKEN }} | |
DOPPLER_DOCS_TOKEN: ${{ secrets.DOPPLER_DOCS_TOKEN }} | |
DOPPLER_JOURNEYS_TOKEN: ${{ secrets.DOPPLER_JOURNEYS_TOKEN }} | |
DOPPLER_JOURNEYS_ADMIN_TOKEN: ${{ secrets.DOPPLER_JOURNEYS_ADMIN_TOKEN }} | |
DOPPLER_SHORT_LINKS_TOKEN: ${{ secrets.DOPPLER_SHORT_LINKS_TOKEN }} | |
DOPPLER_WATCH_TOKEN: ${{ secrets.DOPPLER_WATCH_TOKEN }} | |
DOPPLER_WATCH_ADMIN_TOKEN: ${{ secrets.DOPPLER_WATCH_ADMIN_TOKEN }} | |
DOPPLER_VIDEOS_ADMIN_TOKEN: ${{ secrets.DOPPLER_VIDEOS_ADMIN_TOKEN }} | |
DOPPLER_GITHUB_SERVICE_TOKEN: ${{ secrets.DOPPLER_GITHUB_SERVICE_TOKEN }} | |
DOPPLER_CONFIG: stg | |
with: | |
targets: fetch-secrets,build | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [20] | |
# https://jestjs.io/docs/cli#--shard | |
shard: ['1/3', '2/3', '3/3'] | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch other branches | |
if: ${{ github.event_name == 'pull_request' }} | |
run: git fetch --no-tags --prune --depth=5 origin $GITHUB_BASE_REF | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: node-modules-${{ matrix.node-version }}- | |
- name: NPM Install | |
run: npm install --silent | |
- name: generate prisma imports | |
uses: mansagroup/nrwl-nx-action@v3 | |
with: | |
targets: prisma-generate | |
all: true | |
parallel: 1 | |
env: | |
DISABLE_ERD: true | |
- name: Get number of CPU cores | |
id: cpu-cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
- name: run tests | |
uses: mansagroup/nrwl-nx-action@v3 | |
with: | |
targets: test | |
args: --ci --silent --max-workers ${{ steps.cpu-cores.outputs.count }} --shard=${{ matrix.shard }} | |
parallel: 1 | |
- name: download codecov | |
run: | | |
curl -o /usr/local/bin/codecov https://uploader.codecov.io/latest/linux/codecov | |
chmod +x /usr/local/bin/codecov | |
- name: upload coverage to codecov | |
uses: mansagroup/nrwl-nx-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
targets: codecov |