fix(repository): Move backend code into subdirectory

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-10-02 20:10:32 +02:00 committed by David Mehren
parent 86584e705f
commit bf30cbcf48
272 changed files with 87 additions and 67 deletions

View file

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Docker
name: Backend / Docker
on:
push:
@ -14,6 +14,8 @@ jobs:
build-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@ -28,15 +30,16 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
file: docker/Dockerfile
file: backend/docker/Dockerfile
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }}
target: development
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
sqlite-test:
runs-on: ubuntu-latest
needs: [build-dev]
needs: [ build-dev ]
container:
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }}
steps:
@ -44,7 +47,7 @@ jobs:
sqlite-e2e:
runs-on: ubuntu-latest
needs: [build-dev]
needs: [ build-dev ]
container:
image: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}-ci:${{ github.sha }}
steps:
@ -52,8 +55,10 @@ jobs:
build-prod:
runs-on: ubuntu-latest
needs: [sqlite-test, sqlite-e2e]
needs: [ sqlite-test, sqlite-e2e ]
steps:
- uses: actions/checkout@v3
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4
@ -83,8 +88,9 @@ jobs:
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
file: docker/Dockerfile
file: backend/docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: .

View file

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: AGPL-3.0-only
name: E2E Tests
name: Backend / E2E Tests
on:
push:
@ -13,6 +13,9 @@ on:
env:
NODEJS_VERSION: 18
defaults:
run:
working-directory: backend
jobs:
sqlite: # This run also collects coverage
@ -24,13 +27,14 @@ jobs:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
cache-dependency-path: backend/yarn.lock
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:e2e:cov
- uses: codecov/codecov-action@v3
with:
directory: coverage-e2e
directory: backend/coverage-e2e
flags: e2e-tests
mariadb:
@ -53,6 +57,7 @@ jobs:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
cache-dependency-path: backend/yarn.lock
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
@ -78,6 +83,7 @@ jobs:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
cache-dependency-path: backend/yarn.lock
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable

View file

@ -3,7 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
name: Nest.JS CI
name: Backend / Lint and Test
on:
push:
@ -14,23 +14,23 @@ on:
env:
NODEJS_VERSION: 18
defaults:
run:
working-directory: backend
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
command:
- yarn run lint
- yarn run format
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
cache-dependency-path: backend/yarn.lock
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: ${{matrix.command}}
- run: yarn run lint
build:
runs-on: ubuntu-latest
strategy:
@ -41,6 +41,7 @@ jobs:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
cache-dependency-path: backend/yarn.lock
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --immutable
@ -55,11 +56,12 @@ jobs:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v3
with:
cache-dependency-path: backend/yarn.lock
node-version: ${{ env.NODEJS_VERSION }}
cache: 'yarn'
- run: yarn install --immutable
- run: yarn run test:cov
- uses: codecov/codecov-action@v3
with:
directory: coverage
directory: backend/coverage
flags: integration-tests

View file

@ -6,9 +6,9 @@ name: REUSE Compliance Check
on:
push:
branches: [develop]
branches: [ develop ]
pull_request:
branches: [develop]
branches: [ develop ]
jobs:
reuse: