Skip to content

Commit

Permalink
Merge branch 'main' into feature/backend-integration-test
Browse files Browse the repository at this point in the history
  • Loading branch information
rettetdemdativ authored Apr 24, 2024
2 parents 85cb843 + 080e828 commit f21f168
Show file tree
Hide file tree
Showing 46 changed files with 8,828 additions and 65 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/backend_ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Backend CI

on: [push, pull_request]
on:
push:
paths:
- 'backend/**'
- '.github/workflows/backend_ci.yml'
pull_request:
paths:
- 'backend/**'
- '.github/workflows/backend_ci.yml'


jobs:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/frontend_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Frontend CI

on:
push:
paths:
- 'frontend/**'
- '.github/workflows/frontend_ci.yml'
pull_request:
paths:
- 'frontend/**'
- '.github/workflows/frontend_ci.yml'

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend/vue-gewoscout
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- name: Run Tests
run: docker-compose -f docker-compose.yaml run test
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: |
frontend/vue-gewoscout/test-results/*.xml
- name: TearDown docker compose
run: docker-compose down --remove-orphans
25 changes: 25 additions & 0 deletions .github/workflows/scrapers_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Scrapers CI

on:
push:
paths:
- 'scrapers/**'
- '.github/workflows/scrapers_ci.yml'
pull_request:
paths:
- 'scrapers/**'
- '.github/workflows/scrapers_ci.yml'

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: scrapers
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- name: pip install
run: pip install -r requirements.txt
- name: run pytest
run: pytest
4 changes: 0 additions & 4 deletions .github/workflows/tf_apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
required: false
default: '0'

push:
branches: [ "main", "release**" ]
paths: ["infra/**", ".github/**"]

permissions:
contents: read

Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@
/**/.vscode/*

**/*/local.settings.json

.env
*.zip
/infra/.terraform/
/infra/.terraform.lock.hcl
/infra/env.sh
/infra/env.ps1

.pytest_cache
__pycache__
3 changes: 3 additions & 0 deletions frontend/vue-gewoscout/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.gitignore
test-results
15 changes: 15 additions & 0 deletions frontend/vue-gewoscout/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')

module.exports = {
root: true,
'extends': [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript',
'@vue/eslint-config-prettier/skip-formatting'
],
parserOptions: {
ecmaVersion: 'latest'
}
}
31 changes: 31 additions & 0 deletions frontend/vue-gewoscout/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
bun.lockb
.DS_Store
dist
dist-ssr
coverage
*.local

/cypress/videos/
/cypress/screenshots/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
8 changes: 8 additions & 0 deletions frontend/vue-gewoscout/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
9 changes: 9 additions & 0 deletions frontend/vue-gewoscout/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:20-alpine AS tester
WORKDIR /app

COPY package.json .
RUN npm install --save-dev vitest && npm install

COPY . .

RUN npx vitest
45 changes: 45 additions & 0 deletions frontend/vue-gewoscout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# vue-gewoscout

This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).

## Type Support for `.vue` Imports in TS

TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).

## Project Setup

```sh
npm install
```

### Compile and Hot-Reload for Development

```sh
npm run dev
```

### Type-Check, Compile and Minify for Production

```sh
npm run build
```

### Run Unit Tests with [Vitest](https://vitest.dev/)

```sh
npm run test:unit
```

### Lint with [ESLint](https://eslint.org/)

```sh
npm run lint
```
12 changes: 12 additions & 0 deletions frontend/vue-gewoscout/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "2"

services:
test:
build:
context: .
dockerfile: Dockerfile.test
volumes:
- ./test-results:/app/test-results
command: ["npx", "vitest", "--reporter=junit", "--outputFile=./test-results/test-output.xml"]


1 change: 1 addition & 0 deletions frontend/vue-gewoscout/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
13 changes: 13 additions & 0 deletions frontend/vue-gewoscout/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit f21f168

Please sign in to comment.