Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Release 0 #35

Merged
merged 24 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ad88208
prettier fix
Seb-sti1 Sep 2, 2023
f2ed9f6
Create CI
Seb-sti1 Sep 2, 2023
4e77a52
Importing ConditionsML
a-thansen Sep 8, 2023
650dd65
remove README.md and add gitignore for IDE files
Seb-sti1 Sep 10, 2023
8a8c730
import files for the backend
Seb-sti1 Sep 10, 2023
fd2be31
setup tests
Seb-sti1 Sep 10, 2023
262a5a3
conditions-gp | added first files for Road Continditions #1
marcosantiagomuro Sep 8, 2023
bee86bf
conditions-gp | added other import files for Road Continditions #2
marcosantiagomuro Sep 8, 2023
1768309
conditions-gp | added import files for Road Continditions, comments …
marcosantiagomuro Sep 9, 2023
4ebeeb4
conditions-gp | fixed some imports and dependencies #4
marcosantiagomuro Sep 12, 2023
724ac05
conditions-gp | added css files and prettier #5
marcosantiagomuro Sep 12, 2023
2874698
#conditions-gp | added dependencies and navbar files _6
marcosantiagomuro Sep 12, 2023
2b49369
Add App.css, update index, Navbar and App
Seb-sti1 Sep 12, 2023
94356b8
Create mock lib for react-leaflet
Seb-sti1 Sep 14, 2023
984fe59
add documentation for the backend
Seb-sti1 Sep 11, 2023
03fd0b5
add documentation for the frontend
Seb-sti1 Sep 11, 2023
ed8af9a
add deployment of documentations
Seb-sti1 Sep 11, 2023
56c0c64
.env added for backed domain and url
s203860 Sep 15, 2023
6996c65
Update doc/main pipeline, fix styleguide,
Seb-sti1 Sep 18, 2023
2295929
Update eslint config, fix build warnings
Seb-sti1 Sep 18, 2023
baa5d72
Upgrade frontend dependencies
Seb-sti1 Sep 18, 2023
69429a1
Upgrade backend package and update .eslintrc.js
Seb-sti1 Sep 18, 2023
8afedb3
Use stricter typescript options
Seb-sti1 Sep 18, 2023
783592f
Remove frontend README.md
Seb-sti1 Sep 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# use Ubuntu 22.04 & Node 18

# Seems like the documentation can not be deployed for multiple branch, but only on pushes to main.
# See 5 on https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site

name: Build, aggregate and deploy documentations

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

jobs:
backend:
name: Build backend documentation
runs-on: ubuntu-latest
# Set working directory of the runner
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
- name: Build documentation
run: npm run doc
# Fix permissions of the documentation folder (actions/upload-pages-artifact requirement)
- name: Fix permissions
run: |
chmod -c -R +rX "./documentation/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Save backend documentation
uses: actions/upload-artifact@v3
with:
name: backend-documentation
path: backend/documentation/
retention-days: 1
frontend:
name: Build frontend documentation
runs-on: ubuntu-latest
# Set working directory of the runner
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
- name: Build documentation
run: npm run doc
# Fix permissions of the documentation folder (actions/upload-pages-artifact requirement)
- name: Fix permissions
run: |
chmod -c -R +rX "./styleguide/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Save frontend documentation
uses: actions/upload-artifact@v3
with:
name: frontend-documentation
path: frontend/styleguide/
retention-days: 1
aggregate:
name: Aggregate documentation
# Set dependency on backend job
needs: [backend, frontend]

runs-on: ubuntu-latest
steps:
- name: Download a single artifact
uses: actions/download-artifact@v3
- name: Show content
run: ls -lha
- name: Get the index page of the documentation
uses: actions/checkout@v3
with:
repository: DTU-SE-Group-D/doc-builder
path: doc-builder
- name: Reorder files
run: |
mkdir -p ./documentation
mv -v ./doc-builder/src/index.html ./documentation/index.html
mv -v ./frontend-documentation ./documentation/frontend
mv -v ./backend-documentation ./documentation/backend
- name: Upload documentation
uses: actions/upload-pages-artifact@v2
with:
path: documentation
deploy: # will deploy the website to GitHub Pages only if the push is on the dev branch
name: Deploy documentation
runs-on: ubuntu-latest
needs: [aggregate]

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

if: github.ref == 'refs/heads/dev'

steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
id: deployment

52 changes: 52 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# use Ubuntu 22.04 & Node 18
name: Build & Test

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

jobs:
backend:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
- name: Run prettier
run: npx prettier . --check
- name: Build
run: npm run build
- name: Tests
run: npm run test
- name: Tests end-to-end
run: npm run test:e2e

frontend:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
- name: Run prettier on frontend
run: npx prettier . --check
- name: Build
run: npm run build
- name: Tests
run: npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
4 changes: 4 additions & 0 deletions backend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
],
root: true,
env: {
Expand All @@ -21,5 +23,7 @@ module.exports = {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
};
8 changes: 7 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
/dist
/node_modules

# Credentials
.env

# Logs
logs
*.log
Expand Down Expand Up @@ -32,4 +35,7 @@ lerna-debug.log*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/extensions.json

# Documentation
documentation/
2 changes: 1 addition & 1 deletion backend/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
}
73 changes: 0 additions & 73 deletions backend/README.md

This file was deleted.

Loading