Skip to content

Commit

Permalink
update ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
akellbl4 committed Jul 22, 2022
1 parent 2e8a724 commit 3e19591
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test_backend
name: backend

on:
push:
Expand All @@ -10,17 +10,19 @@ on:
- "!backend/scripts/**"
- "!**.md"
pull_request:
types: [opened, reopened]
paths:
- ".github/workflows/ci-test-backend.yml"
- "backend/**"
- "!backend/scripts/**"
- "!**.md"
jobs:
test-backend:
test:
name: Test & Coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: debug if needed
run: if [[ "$DEBUG" == "true" ]]; then env; fi
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: build
on:
push:
branches:
- master
tags:
paths:
- ".github/workflows/ci-build.yml"
Expand All @@ -24,10 +25,11 @@ on:

jobs:
build-images:
name: Build Docker images
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/ci-frontend-size-limit.yml

This file was deleted.

62 changes: 44 additions & 18 deletions .github/workflows/ci-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: frontend
on:
push:
branches:
tags:
- master
paths:
- ".github/workflows/ci-frontend.yml"
- "frontend/apps/remark42/**"
Expand All @@ -15,18 +15,19 @@ on:
- "!**.md"

jobs:
check-translations:
translations-check:
name: Translations check
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.15.1]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

Expand All @@ -51,25 +52,26 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --loglevel warn
run: pnpm i
working-directory: ./frontend

- name: Run translations check
- name: Translations check
run: pnpm translation-check
working-directory: ./frontend/apps/remark42

check-typescript:
type-check:
name: Type check
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.15.1]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

Expand All @@ -94,25 +96,26 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --loglevel warn
run: pnpm i
working-directory: ./frontend

- name: Run type check
run: pnpm type-check
working-directory: ./frontend/apps/remark42

lint:
name: Eslint & Stylelint
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.15.1]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

Expand All @@ -137,25 +140,48 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --loglevel warn
run: pnpm i
working-directory: ./frontend

- name: Run linters
run: pnpm lint
working-directory: ./frontend/apps/remark42

size-limit:
name: Size limit
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
id: pnpm-install
with:
version: 7
run_install: false

- name: Check bundle size
uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
directory: ./frontend/apps/remark42

test:
name: Tests & Coverage
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.15.1]

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

Expand All @@ -180,11 +206,11 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --loglevel warn
run: pnpm i
working-directory: ./frontend

- name: Collect tests coverage
run: pnpm run test --coverage
- name: Test & Coverage
run: pnpm coverage
working-directory: ./frontend/apps/remark42

- name: Submit coverage
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: site
on:
push:
branches:
- master
tags:
paths:
- ".github/workflows/ci-site.yml"
Expand All @@ -13,13 +14,13 @@ on:
- "site/**"

jobs:

build-site:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down

0 comments on commit 3e19591

Please sign in to comment.