Skip to content

Commit

Permalink
CI/templates and workflows (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gijsdeman authored Nov 8, 2024
2 parents 42b4e29 + 70e6d2f commit e4e13b6
Show file tree
Hide file tree
Showing 12 changed files with 236 additions and 91 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Bug Report"
description: Report a ug found while using the Aurora Core.
title: "[Bug]: "
labels: ["Type: Bug", "Status: Triage"]
body:
- type: textarea
id: current-behavior
attributes:
label: Current behaviour
description: A description of what is currently happening, including screenshots and other useful information (**DO NOT INCLUDE PRIVATE INFORMATION**).
placeholder: Currently...
validations:
required: true
- type: textarea
id: desired-behavior
attributes:
label: Desired behaviour
description: A clear description of what you think should happen.
placeholder: In this situation, I expected ...
- type: textarea
id: reproduction
attributes:
label: Steps to reproduce
description: Clearly describe which steps or actions you have taken to arrive at the problem. If you have some experience with the code, please link to the specific pieces of code.
placeholder: I did X, then Y, before arriving at Z, when ERROR ...
validations:
required: true
- type: textarea
id: other
attributes:
label: Other information
description: Any other details?

23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Feature Request"
description: Suggest a feature or enhancement to improve Aurora Core.
labels: ["Type: Idea"]
body:
- type: textarea
id: feature
attributes:
label: What would you like?
description: A clear description of the feature or enhancement wanted.
placeholder: I'd like to be able to...
validations:
required: true
- type: textarea
id: reason
attributes:
label: Why is this needed?
description: A clear description of why this would be useful to have.
placeholder: I want this because...
- type: textarea
id: other
attributes:
label: Other information
placeholder: Any other details?
10 changes: 10 additions & 0 deletions .github/depandabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "yarn"
directories:
- "."
schedule:
interval: "weekly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!-- Provide a general summary of your changes in the title above. -->

# Description
<!--
What do you want to achieve with this PR? Why did you write this code? What problem does this PR solve?
Describe your changes in detail and, if relevant, explain which choices you have made and why.
When making changes to the UI, make sure to include comparison screenshots!
-->

## Related issues/external references
<!--
Format issues on GitHub as `#XXX`. Tickets from support.gewis.nl can also be auto-linked by using
`ABC-YYMM-XXX`.
-->

## Types of changes
<!-- What types of changes does your code introduce? Remove all the items that do not apply: -->
- Bug fix _(non-breaking change which fixes an issue)_
- New feature _(non-breaking change which adds functionality)_
- Breaking change _(fix or feature that would cause existing functionality to change)_
- Documentation improvement
- Style _(Change that do not affect the functionality of the code)_
- CI/CD _(Changes to the CI/CD configuration)_
19 changes: 19 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Lint and build

on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
build-and-lint:
uses: GEWIS/actions/.github/workflows/typescript-lint-and-build.yml@v0.0.2
with:
node-version: "22.x"
package-manager: "yarn"
lint: true
format: true
build: true
22 changes: 22 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Semantic release

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
semantic-release:
uses: GEWIS/actions/.github/workflows/semantic-release.yml@v0.0.2
with:
projects: "['.']"
docker_registry: "abc.docker-registry.gewis.nl"
docker_paths: "['nc/aurora/core']"
secrets:
REGISTRY_USERNAME: ${{ secrets.SVC_GH_ABCNC_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.SVC_GH_ABCNC_PWD }}


18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Build in a different image to keep the target image clean
FROM node:20 as build
ENV NODE_ENV development
FROM node:22 AS build
ENV NODE_ENV=development
WORKDIR /app
COPY ./package.json ./package-lock.json ./
RUN npm install
COPY ./package.json ./yarn.lock ./
RUN yarn
COPY ./ ./
RUN npm run build
RUN yarn build

# Target image that will be run
FROM node:20-alpine as target
ENV NODE_ENV production
FROM node:22-alpine AS target
ENV NODE_ENV=production

WORKDIR /app
COPY ./package.json ./package-lock.json ./
COPY ./package.json ./yarn.lock ./
RUN apk add --no-cache git
RUN npm ci
RUN yarn install --production
COPY --from=build --chown=node /app/dist /app
COPY ./public ./public

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The other repositories can be found here:
- [Aurora DMX Lights Proxy](https://github.com/gewis/aurora-audio-player).

## Prerequisites
- NodeJS 20.
- NodeJS 22.

## Installation
1. Copy `.env.example` to `.env` and fill in the environment variables.
Expand Down
11 changes: 8 additions & 3 deletions openapi-ts.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ export default defineConfig({
client: '@hey-api/client-fetch',
input: './build/swagger.json',
output: `../narrowcasting-client/src/api/`,
types: {
enums: 'typescript',
},
plugins: [
'@hey-api/schemas',
'@hey-api/services',
{
enums: 'typescript',
name: '@hey-api/types',
},
],
});
34 changes: 19 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,48 +31,49 @@
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express": "^4.21.1",
"express-session": "^1.18.1",
"global": "^4.4.0",
"globals": "^15.11.0",
"joi": "^17.13.3",
"jwt-decode": "^4.0.0",
"mysql2": "^3.11.3",
"node-cron": "^3.0.3",
"openid-client": "^5.7.0",
"passport": "^0.7.0",
"passport-custom": "^1.1.1",
"pino": "^9.4.0",
"pino": "^9.5.0",
"pino-http": "^10.3.0",
"pino-pretty": "^11.2.2",
"pino-pretty": "^11.3.0",
"qs": "^6.13.0",
"socket.io": "^4.8.0",
"socket.io": "^4.8.1",
"sqlite3": "^5.1.7",
"swagger-ui-express": "^5.0.1",
"tsoa": "^6.5.1",
"typeorm": "^0.3.20",
"uuid": "^10.0.0"
"uuid": "^11.0.2"
},
"devDependencies": {
"@tsoa/runtime": "^6.5.1",
"@tsoa/cli": "^6.5.1",
"@eslint/compat": "^1.2.0",
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@hey-api/openapi-ts": "^0.53.11",
"@hey-api/openapi-ts": "^0.54.2",
"@tsoa/cli": "^6.5.1",
"@tsoa/runtime": "^6.5.1",
"@types/node": "^22.8.7",
"@types/async-lock": "^1.4.2",
"@types/cookie-parser": "^1.4.7",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/express-session": "^1.18.0",
"@types/node-cron": "^3.0.11",
"@types/passport": "^1.0.16",
"@types/passport": "^1.0.17",
"@types/passport-strategy": "^0.2.38",
"@types/swagger-ui-express": "^4.1.6",
"@types/swagger-ui-express": "^4.1.7",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.1",
"@typescript-eslint/eslint-plugin": "^8.12.2",
"@typescript-eslint/parser": "^8.12.2",
"@eslint/js": "^9.14.0",
"concurrently": "^9.0.1",
"eslint": "^9.12.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"husky": "^9.1.6",
Expand All @@ -82,5 +83,8 @@
"ts-node": "^10.9.2",
"typescript": "^5.6.3"
},
"engines": {
"node": ">=22.0.0"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
19 changes: 19 additions & 0 deletions release.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default {
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"successComment": false,
"failComment": false,
"failTitle": false,
"labels": false,
"releasedLabels": false
}
]
]
}


Loading

0 comments on commit e4e13b6

Please sign in to comment.