Skip to content

Commit

Permalink
Rewrites the frontend app (#4982)
Browse files Browse the repository at this point in the history
The whole app was rewritten in TypeScript with modern tooling and libraries.

---------

Co-authored-by: tonypls <tonyvanswet@gmail.com>
Co-authored-by: Markus Killendahl <markus.killendahl@tmrow.com>
Co-authored-by: Viktor Andersson <30777521+VIKTORVAV99@users.noreply.github.com>
Co-authored-by: lav-julien <112700080+lav-julien@users.noreply.github.com>
  • Loading branch information
5 people committed Jan 30, 2023
1 parent ee8e009 commit cb9664f
Show file tree
Hide file tree
Showing 2,492 changed files with 43,039 additions and 190,654 deletions.
109 changes: 0 additions & 109 deletions .circleci/config.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/labeler.yml
@@ -1,5 +1,4 @@
infrastructure:
- .circleci/*
- .github/**/*
- docker-compose.yml
- web/Dockerfile
Expand Down
File renamed without changes.
41 changes: 20 additions & 21 deletions .github/workflows/CI.yml
Expand Up @@ -4,8 +4,6 @@ on:
branches:
- master
pull_request:
branches:
- master

jobs:
# This job is used to determine what files have changed and is used by later jobs to determine if they should run.
Expand Down Expand Up @@ -89,13 +87,13 @@ jobs:
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/validate-local-links-in-md.yml

jest:
name: Jest
needs: [setup, prettier]
if: >-
needs.setup.outputs.frontend != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/jest.yml
# unit_test:
# name: Unit test
# needs: [setup, prettier]
# if: >-
# needs.setup.outputs.frontend != 'false' ||
# needs.setup.outputs.workflows != 'false'
# uses: ./.github/workflows/unit_test.yml

jsonlint:
name: JSONLint
Expand All @@ -106,13 +104,13 @@ jobs:
uses: ./.github/workflows/jsonlint.yml

# Frontend checks
eslint:
name: ESLint
needs: [setup, prettier]
if: >-
needs.setup.outputs.frontend != 'false' ||
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/eslint.yml
# eslint:
# name: ESLint
# needs: [setup, prettier]
# if: >-
# needs.setup.outputs.frontend != 'false' ||
# needs.setup.outputs.workflows != 'false'
# uses: ./.github/workflows/eslint.yml

verify:
name: Verify
Expand All @@ -123,11 +121,11 @@ jobs:
needs.setup.outputs.workflows != 'false'
uses: ./.github/workflows/verify.yml

cypress:
name: Cypress
needs: [eslint, verify, jest]
uses: ./.github/workflows/cypress.yml
secrets: inherit
# cypress:
# name: Cypress
# needs: [eslint, verify, unit_test]
# uses: ./.github/workflows/cypress.yml
# secrets: inherit

# Python checks
python:
Expand All @@ -149,5 +147,6 @@ jobs:

# Code quality checks
codeql:
needs: [setup, prettier]
name: CodeQL
uses: ./.github/workflows/codeql.yml
8 changes: 6 additions & 2 deletions .github/workflows/cypress.yml
Expand Up @@ -8,11 +8,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 7
- name: Cypress run
uses: cypress-io/github-action@v5
env:
TZ: Europe/Copenhagen
with:
working-directory: ./web
start: yarn develop
wait-on: 'http://localhost:8080'
start: pnpm dev
wait-on: 'http://localhost:5173'
22 changes: 13 additions & 9 deletions .github/workflows/eslint.yml
Expand Up @@ -19,24 +19,26 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 7
- name: Setup Node v14.x
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
cache-dependency-path: web/yarn.lock
- name: Restore node_modules
id: cache
node-version: 14
- name: Restore node_modules for web
id: cache-web
uses: actions/cache@v3
with:
path: ./web/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/yarn.lock') }}
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
- name: Install web dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Generate zone config
if: steps.cache.outputs.cache-hit == 'true'
run: yarn generate-zones-config
run: pnpm generate-zones-config
- name: Restore ESLint cache
uses: actions/cache@v3
with:
Expand All @@ -48,6 +50,8 @@ jobs:
${{ runner.os }}-eslint_cache
- name: ESLint
run: node_modules/.bin/eslint .
--ignore-path .gitignore
--ext .ts,.tsx .
--cache
--cache-location node_modules/.cache/eslint/.eslintcache
--format @microsoft/eslint-formatter-sarif
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/jest.yml

This file was deleted.

15 changes: 9 additions & 6 deletions .github/workflows/prettier.yml
Expand Up @@ -11,20 +11,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 7
- name: Setup Node v14.x
uses: actions/setup-node@v3
with:
node-version: lts/*
node-version: 14
- name: Restore node_modules for web
id: cache-web
uses: actions/cache@v3
with:
path: |
web/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/yarn.lock') }}
path: web/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
- name: Install web dependencies
if: steps.cache-web.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
working-directory: ./web
- name: Prettier Check
# Uses the prettier binary from the web node_modules so it's always in sync.
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/unit_test.yml
@@ -0,0 +1,37 @@
on:
workflow_call:

jobs:
unit_test:
name: Unit test
runs-on: ubuntu-latest
timeout-minutes: 4
defaults:
run:
working-directory: web
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 7
- name: Setup Node v14.x
uses: actions/setup-node@v3
with:
node-version: 14

- name: Restore node_modules for web
id: cache-web
uses: actions/cache@v3
with:
path: ./web/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
- name: Install web dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile
- name: Generate zone config
if: steps.cache.outputs.cache-hit == 'true'
run: pnpm generate-zones-config
- name: Run test
run: pnpm run test
18 changes: 10 additions & 8 deletions .github/workflows/verify.yml
Expand Up @@ -14,26 +14,28 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 7
- name: Setup Node v14.x
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
cache-dependency-path: web/yarn.lock
node-version: 14
- name: Restore node_modules
id: cache
uses: actions/cache@v3
with:
path: ./web/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/yarn.lock') }}
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
- name: Install web dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
- name: Generate zone config
if: steps.cache.outputs.cache-hit == 'true'
run: yarn generate-zones-config
run: pnpm generate-zones-config
- name: Verify geometries
run: |
node geo/update-world.js
pnpm run update-world
env:
VERIFY_NO_UPDATES: 1

0 comments on commit cb9664f

Please sign in to comment.