Skip to content

Commit

Permalink
Merge branch 'master' into 6979-make-relative-date-configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Tirokk authored Feb 8, 2024
2 parents fb56539 + cea188e commit c45d831
Show file tree
Hide file tree
Showing 127 changed files with 40,029 additions and 85 deletions.
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,29 @@ updates:
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"

# frontend
- package-ecosystem: "github-actions"
directory: "/frontend"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"
- package-ecosystem: npm
directory: "/frontend"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"
- package-ecosystem: docker
directory: "/frontend"
rebase-strategy: "disabled"
schedule:
interval: weekly
day: "saturday"
timezone: "Europe/Berlin"
time: "03:00"
19 changes: 19 additions & 0 deletions .github/file-filters.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# These file filter patterns are used by the action https://github.com/dorny/paths-filter

backend: &backend
- '.github/workflows/test-backend.yml'
- 'backend/**/*'
Expand Down Expand Up @@ -29,3 +31,20 @@ vuepress: &vuepress
documentation: &documentation
- *vuepress
- *markdown

# frontend
frontend-test-lint-code: &frontend-test-lint-code
- 'frontend/**/*'

frontend-test-unit-code: &frontend-test-unit-code
- 'frontend/**/*'

frontend-test-build-code: &frontend-test-build-code
- 'frontend/**/*'

frontend-test-build-docs: &frontend-test-build-docs
- 'frontend/**/*.md'
- 'frontend/.vuepress/*'

frontend-test-build-storybook: &frontend-test-build-storybook
- 'frontend/**/*'
21 changes: 21 additions & 0 deletions .github/workflows/frontend.deploy.chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "frontend:deploy:chromatic"
on:
push:
branches:
- master
jobs:
build-and-deploy:
name: Chromatic - Frontend
runs-on: ubuntu-latest
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Frontend | Build
run: npm install && npm run chromatic -- --exit-zero-on-changes
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/frontend.test.build.code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "frontend:test:build test code"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - frontend-test-build-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-code }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build:
if: needs.files-changed.outputs.changes == 'true'
name: Build - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build
run: npm install && npm run build
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/frontend.test.build.docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "frontend:test:build test docs"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - frontend-test-build-docs
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-docs }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

build:
if: needs.files-changed.outputs.changes == 'true'
name: Build Docs - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Docs
run: npm install && npm run docs:build
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/frontend.test.build.storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "frontend:test:build test storybook"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - frontend-test-build-storybook
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-build-storybook }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

storybook:
if: needs.files-changed.outputs.changes == 'true'
name: Build Storybook - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Storybook
run: npm install && npm run storybook:build
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/frontend.test.lint.code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "frontend:test:lint code with defined linters"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - frontend-test-lint-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-lint-code }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

lint:
if: needs.files-changed.outputs.changes == 'true'
name: Lint - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Lint
run: npm install && npm run test:lint
working-directory: ${{env.WORKING_DIRECTORY}}
37 changes: 37 additions & 0 deletions .github/workflows/frontend.test.unit.code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "frontend:test:unit test code with defined suites"

on: push

jobs:
# only (but most important) job from this workflow required for pull requests
# check results serve as run conditions for all other jobs here
files-changed:
name: Detect File Changes - frontend-test-unit-code
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.frontend-test-unit-code }}
steps:
- uses: actions/checkout@v4

- name: Check for frontend file changes
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
list-files: shell

unit:
if: needs.files-changed.outputs.changes == 'true'
name: Unit - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Unit
run: npm install && npm run test:unit
working-directory: ${{env.WORKING_DIRECTORY}}
1 change: 1 addition & 0 deletions .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
- name: backend | copy env files
run: |
cp webapp/.env.template webapp/.env
cp frontend/.env.dist frontend/.env
cp backend/.env.template backend/.env
- name: backend | docker-compose
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
- name: Copy env files
run: |
cp webapp/.env.template webapp/.env
cp frontend/.env.dist frontend/.env
cp backend/.env.template backend/.env
- name: Build docker images
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
- name: Copy env files
run: |
cp webapp/.env.template webapp/.env
cp frontend/.env.dist frontend/.env
cp backend/.env.template backend/.env
- name: backend | docker-compose
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "ocelot.social lint pull request CI"
name: "test:lint pull request CI"

on:
pull_request_target:
Expand All @@ -7,6 +7,10 @@ on:
- edited
- synchronize

permissions:
pull-requests: write
statuses: write

jobs:
main:
name: Validate PR title
Expand All @@ -26,8 +30,12 @@ jobs:
scopes: |
backend
webapp
frontend
database
docu
docker
release
workflow
other
# Configure that a scope must always be provided.
requireScope: true
Expand Down
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-security": "^1.7.1",
Expand Down
Loading

0 comments on commit c45d831

Please sign in to comment.