-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #276 from computas/develop
Merge dev into release
- Loading branch information
Showing
219 changed files
with
9,324 additions
and
36,585 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
91 changes: 49 additions & 42 deletions
91
...ure-static-web-apps-computas-instance.yml → ...hub/workflows/azure-deploy-to-develop.yml
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 |
---|---|---|
@@ -1,42 +1,49 @@ | ||
name: Deploy to computas instance of Kunstige Jens Azure Static Web Apps CI/CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_and_deploy_job: | ||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') | ||
runs-on: ubuntu-latest | ||
name: Build and Deploy Job | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Build And Deploy | ||
id: builddeploy | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_BUSH_01C322703 }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) | ||
action: 'upload' | ||
###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### | ||
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig | ||
app_build_command: 'npm run build -- --configuration computas' | ||
app_location: '/' # App source code path | ||
api_location: '' # Api source code path - optional | ||
output_location: '/dist/tekniskmuseum' # Built app content directory - optional | ||
###### End of Repository/Build Configurations ###### | ||
|
||
close_pull_request_job: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' | ||
runs-on: ubuntu-latest | ||
name: Close Pull Request Job | ||
steps: | ||
- name: Close Pull Request | ||
id: closepullrequest | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_BUSH_01C322703 }} | ||
action: 'close' | ||
#Workflow to run when deploying to development environment. | ||
|
||
name: Azure Deploy to Development environment | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
types: [opened, synchronize, reopened, closed] | ||
branches: | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_deploy_job: | ||
runs-on: ubuntu-latest | ||
name: Build and Deploy Job | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
lfs: false | ||
- name: Build And Deploy | ||
id: builddeploy | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_JOLLY_GROUND_07BB42C03 }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) | ||
action: 'upload' | ||
###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### | ||
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig | ||
app_build_command: 'npm run build -- --configuration ComputasProd' | ||
app_location: '/' # App source code path | ||
api_location: '' # Api source code path - optional | ||
output_location: '/dist/tekniskmuseum' # Built app content directory - optional | ||
###### End of Repository/Build Configurations ###### | ||
|
||
close_pull_request_job: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' | ||
runs-on: ubuntu-latest | ||
name: Close Pull Request Job | ||
steps: | ||
- name: Close Pull Request | ||
id: closepullrequest | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_JOLLY_GROUND_07BB42C03 }} | ||
action: 'close' |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,36 +1,34 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Lint, Test & Build | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- "master" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [12.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm run test:ci | ||
|
||
- name: Build | ||
run: npm run build:ci | ||
# This workflow will do a clean install of node dependencies, build the source code, perform lint checks and run tests across different versions of node. | ||
# This workflow will only be run for pull requests to either master or develop branch provided there are no merge conflicts. | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
# TODO: Add a step for performing bun test. | ||
name: Lint & Build | ||
|
||
on: | ||
pull_request: | ||
branches: ["master", "develop"] | ||
|
||
jobs: | ||
build: | ||
name: Lint & Build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [21.x] | ||
|
||
steps: | ||
- name: Checkout ✔️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup bun 🥟 | ||
uses: oven-sh/setup-bun@v1 | ||
|
||
- name: Install dependencies 📝 | ||
run: bun install | ||
|
||
- name: Run Lint 🧼 | ||
run: bun run lint | ||
|
||
- name: Build 🛠️ | ||
run: bun run build --configuration ComputasProd |
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 |
---|---|---|
@@ -1,46 +1,38 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. | ||
|
||
# compiled output | ||
# Compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
# Only exists if Bazel was run | ||
/bazel-out | ||
|
||
# dependencies | ||
# Node | ||
/node_modules | ||
|
||
# profiling files | ||
chrome-profiler-events*.json | ||
speed-measure-plugin*.json | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# IDEs and editors | ||
/.idea | ||
.idea/ | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
# Visual Studio Code | ||
.vscode | ||
|
||
# misc | ||
/.sass-cache | ||
# Miscellaneous | ||
/.angular/cache | ||
.sass-cache/ | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
/tekniskmuseum.code-workspace | ||
|
||
# System Files | ||
# System files | ||
.DS_Store | ||
Thumbs.db |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true | ||
} | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
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 |
---|---|---|
@@ -1,13 +1,44 @@ | ||
# Tekniskmuseum | ||
|
||
## Setup | ||
|
||
Run `npm install` | ||
|
||
## Development server | ||
|
||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
|
||
## Documentation | ||
https://confluence.computas.com/display/SO/Teknisk+museum | ||
|
||
# Tekniskmuseum | ||
|
||
Dette er repoet som står for front-end biten av Teknisk Museum-prosjektet "Kunstig Jens". Her finner du svar på de viktigste tingene du trenger å kunne for å starte opp applikasjonen. | ||
|
||
## Oppsett | ||
|
||
1. Prosjektet bruker [Bun](https://bun.sh) for pakkebehandling og kjøring av kode. Om du ikke har installert Bun, kan det gjøres slik: | ||
|
||
```shell | ||
# For MacOS, Linux, og WSL | ||
curl -fsSL https://bun.sh/install | bash | ||
|
||
# For Windows | ||
powershell -c "irm bun.sh/install.ps1|iex" | ||
``` | ||
|
||
2. Deretter kan du installere avhengighetene i prosjektet ved å kjøre | ||
|
||
```shell | ||
bun install | ||
``` | ||
|
||
3. Til slutt kan du starte opp det lokale utviklingsmiljøet ved å kjøre | ||
|
||
```shell | ||
bun run start | ||
``` | ||
|
||
## Forskjellige miljøer | ||
|
||
Om man ønsker å gå mot forskjellige miljøer, er det satt opp et sett med forskjellige konfigurasjoner i prosjektet. Disse finner man i mappen `/src/environments/`. Om man f.eks. ønsker å bruke konfigurasjonen "Computas", kan man gjøre det ved å legge til argumentet `--configuration` når man starter opp det lokale utviklingsmiljøet. Det vil si at man da kjører scriptet | ||
|
||
```shell | ||
bun run start --configuration computas | ||
``` | ||
|
||
## Oppstår det problemer i teamet forbundet med bruk av Bun? | ||
|
||
Ikke noe problem! Dere kan enkelt gå over til mer tradisjonelle verktøy som Yarn eller NPM. Da er det bare å gjøre følgende: | ||
|
||
- Slett `bun.lockb` filen. | ||
- Endre workflowene i `.github/workflows` til å ikke bruke Bun (dvs erstatt trinnet `uses: oven-sh/setup-bun@v1` samt andre kall som bruker Bun). | ||
- Skriv inn ny pakkebehandler i feltet `cli.packageManager` i `angular.json`. | ||
- Lag en ny lockfil med den nye pakkebehandleren ved å kjøre hhv. `npm i` eller `yarn`. |
Oops, something went wrong.