-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 53207cf
Showing
240 changed files
with
35,819 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
# EditorConfig Configurtaion file, for more details see: | ||
# https://EditorConfig.org | ||
# EditorConfig is a convention description, that could be interpreted | ||
# by multiple editors to enforce common coding conventions for specific | ||
# file types | ||
|
||
# top-most EditorConfig file: | ||
# Will ignore other EditorConfig files in Home directory or upper tree level. | ||
root = true | ||
|
||
|
||
[*] # For All Files | ||
# Unix-style newlines with a newline ending every file | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
# Set default charset | ||
charset = utf-8 | ||
# Indent style default | ||
indent_style = space | ||
# Max Line Length - a hard line wrap, should be disabled | ||
max_line_length = off | ||
|
||
[*.{py,cfg,ini}] | ||
# 4 space indentation | ||
indent_size = 4 | ||
|
||
[*.{html,dtml,pt,zpt,xml,zcml,js,json,less,css,yml,yaml}] | ||
# 2 space indentation | ||
indent_size = 2 | ||
|
||
[{Makefile,.gitmodules}] | ||
# Tab indentation (no size specified, but view as 4 spaces) | ||
indent_style = tab | ||
indent_size = unset | ||
tab_width = unset |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
name: Backend CI | ||
|
||
on: | ||
push: | ||
paths: | ||
- "backend/**" | ||
- ".github/workflows/backend.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run check | ||
uses: plone/code-analysis-action@v2 | ||
with: | ||
base_dir: 'backend' | ||
check: 'black' | ||
|
||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run check | ||
uses: plone/code-analysis-action@v2 | ||
with: | ||
base_dir: 'backend' | ||
check: 'flake8' | ||
|
||
isort: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run check | ||
uses: plone/code-analysis-action@v2 | ||
with: | ||
base_dir: 'backend' | ||
check: 'isort' | ||
|
||
zpretty: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run check | ||
uses: plone/code-analysis-action@v2 | ||
with: | ||
base_dir: 'backend' | ||
check: 'zpretty' | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: | ||
- 3.11 | ||
plone: | ||
- "6.0.0" | ||
|
||
defaults: | ||
run: | ||
working-directory: ./backend | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Plone ${{ matrix.plone }} with Python ${{ matrix.python }} | ||
uses: plone/setup-plone@v2.0.0 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
plone-version: ${{ matrix.plone }} | ||
|
||
- name: Install package | ||
run: | | ||
pip install mxdev | ||
mxdev -c mx.ini | ||
pip install -r requirements-mxdev.txt | ||
- name: Run tests | ||
run: | | ||
PYTHONWARNINGS=ignore zope-testrunner --auto-color --auto-progress --test-path src/zeeuwsmuseumwebsite/src/ | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: [black, flake8, isort, zpretty, tests] | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
intkbv/zeeuwsmuseumwebsite-backend | ||
labels: | | ||
org.label-schema.docker.cmd=docker run -d -p 8080:8080 intkbv/zeeuwsmuseumwebsite-backend:latest | ||
tags: | | ||
type=ref,event=branch | ||
type=sha | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64 | ||
context: backend | ||
file: backend/Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
name: Frontend CI | ||
|
||
on: | ||
push: | ||
paths: | ||
- "frontend/**" | ||
- ".github/workflows/frontend.yml" | ||
workflow_dispatch: | ||
|
||
env: | ||
node-version: 16.x | ||
|
||
jobs: | ||
|
||
eslint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ env.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node-version }} | ||
cache: 'yarn' | ||
cache-dependency-path: 'frontend/yarn.lock' | ||
|
||
- name: Install packages | ||
run: make install | ||
|
||
- name: Lint | ||
run: yarn run lint:ci | ||
|
||
prettier: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Prettier | ||
run: npx prettier@2.0.5 --single-quote --check 'src/**/*.{js,jsx,ts,tsx,css,scss}' --config=package.json | ||
|
||
|
||
i18n: | ||
name: i18n sync | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: frontend | ||
|
||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ env.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node-version }} | ||
cache: 'yarn' | ||
cache-dependency-path: 'frontend/yarn.lock' | ||
|
||
- name: Install packages | ||
run: make install | ||
|
||
- name: Test i18n sync | ||
run: make i18n-ci | ||
|
||
unit: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ env.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node-version }} | ||
cache: 'yarn' | ||
cache-dependency-path: 'frontend/yarn.lock' | ||
|
||
- name: Install packages | ||
run: make install | ||
|
||
- name: Test | ||
run: make test | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [eslint, prettier, i18n, unit] | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
intkbv/zeeuwsmuseumwebsite-frontend | ||
labels: | | ||
org.label-schema.docker.cmd=docker run -d -p 3000:3000 intkbv/zeeuwsmuseumwebsite-frontend:latest | ||
tags: | | ||
type=ref,event=branch | ||
type=sha | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64 | ||
context: frontend/ | ||
file: frontend/Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: $${{ steps.meta.outputs.labels }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!.vscode |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "eslint.workingDirectories": ["./frontend"] } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 2023-01-18 | ||
|
||
- Initial version [intkbv] |
Oops, something went wrong.