Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency eslint to v9 #298

Merged
merged 10 commits into from
Oct 3, 2024
  •  
  •  
  •  
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

14 changes: 0 additions & 14 deletions .eslintrc.js

This file was deleted.

40 changes: 19 additions & 21 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,34 @@ name: Docker Image CI

on:
push:
branches: [ "master" ]
branches: ["master"]
paths-ignore:
- .github/workflows/helm-chart-publish.yml
- .github/workflows/release.yml
- charts/**
workflow_dispatch:
jobs:

build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.ref == 'refs/heads/master' }}
tags: ghcr.io/michaelsp/timelimit-server/timelimit:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.ref == 'refs/heads/master' }}
tags: ghcr.io/michaelsp/timelimit-server/timelimit:latest
cache-from: type=gha
cache-to: type=gha,mode=max
10 changes: 5 additions & 5 deletions .github/workflows/helm-chart-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ name: Helm Chart CI

on:
push:
branches: [ "master" ]
branches: ["master"]
paths:
- .github/workflows/helm-chart-publish.yml
- charts/**

workflow_dispatch:

jobs:
chart:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PR check

on:
pull_request:
branches: [ "master" ]
branches: ["master"]

jobs:
build:
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: "3.9"
check-latest: true
- uses: helm/[email protected]

Expand All @@ -45,9 +45,9 @@ jobs:
- name: install helm dependencies
if: steps.list-changed.outputs.changed == 'true'
run: |
helm dependency update charts/*
helm repo add bitnami https://charts.bitnami.com/bitnami
helm plugin install https://github.com/helm-unittest/helm-unittest.git
helm dependency update charts/*
helm repo add bitnami https://charts.bitnami.com/bitnami
helm plugin install https://github.com/helm-unittest/helm-unittest.git

- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ name: Release Docker image

on:
release:
types: [ published ]
types: [published]

workflow_dispatch:

jobs:
release:

runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -34,4 +33,4 @@ jobs:
push: true
tags: ghcr.io/michaelsp/timelimit-server/timelimit:v${{ env.VERSION }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.3.0
20
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore artifacts:
build
coverage
# this one is strange, but it's the only one that works
charts/timelimit/templates/*.yaml
charts/timelimit/templates/tests/*.yaml
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": false
}
3 changes: 1 addition & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ This is the server for the connected mode in TimeLimit.

This Readme became too long. Due to that, it was split into [mutliple files](https://codeberg.org/timelimit/timelimit-server/src/branch/master/docs/usage).


### Usage Docker

```shell
Expand All @@ -20,4 +19,4 @@ helm repo add timelimit https://michaelsp.github.io/timelimit-server/
helm install timelimit timelimit/timelimit
```

Please find [the `values.yaml` here](charts/timelimit/values.yaml).
Please find [the `values.yaml` here](charts/timelimit/values.yaml).
4 changes: 2 additions & 2 deletions charts/timelimit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.6
version: 0.3.7

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.17.0"
appVersion: "1.17.1"

dependencies:
- name: mariadb
Expand Down
4 changes: 2 additions & 2 deletions charts/timelimit/tests/__snapshot__/simple_test.yaml.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Matches the snapshot:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: timelimit
app.kubernetes.io/version: 1.17.0
app.kubernetes.io/version: 1.17.1
helm.sh/chart: timelimit-0.2.8
name: RELEASE-NAME-timelimit
spec:
Expand Down Expand Up @@ -75,7 +75,7 @@ Supports DB_DRIVER:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: timelimit
app.kubernetes.io/version: 1.17.0
app.kubernetes.io/version: 1.17.1
helm.sh/chart: timelimit-0.2.8
name: RELEASE-NAME-timelimit
spec:
Expand Down
21 changes: 11 additions & 10 deletions charts/timelimit/tests/simple_test.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
suite: email Test Suite
templates:
- deployment.yaml
- deployment.yaml
chart:
version: 0.2.8
appVersion: 1.17.1
tests:
- it: Matches the snapshot
asserts:
- matchSnapshot: { }
- it: Supports DB_DRIVER
set:
mariadb:
enabled: true
asserts:
- matchSnapshot: { }
- it: Matches the snapshot
asserts:
- matchSnapshot: {}
- it: Supports DB_DRIVER
set:
mariadb:
enabled: true
asserts:
- matchSnapshot: {}
9 changes: 6 additions & 3 deletions charts/timelimit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ serviceAccount:

podAnnotations: {}

podSecurityContext: {}
podSecurityContext:
{}
# fsGroup: 2000

securityContext: {}
securityContext:
{}
# capabilities:
# drop:
# - ALL
Expand Down Expand Up @@ -72,7 +74,8 @@ ingress:
# hosts:
# - timelimit.example.com

resources: {}
resources:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

services:
api:
image: 'ghcr.io/michaelsp/timelimit-server/timelimit:latest'
image: "ghcr.io/michaelsp/timelimit-server/timelimit:latest"
build:
context: .
environment:
Expand All @@ -12,19 +12,19 @@ services:
PORT: 8080
MAIL_SENDER: [email protected]
MAIL_TRANSPORT: '{"host": "localhost", "port": 25}'
ALWAYS_PRO: 'yes'
ALWAYS_PRO: "yes"
# put additional config variables here
ports:
- "8080:8080"
- "8080:8080"
restart: always
links:
- database
- database
database:
image: 'mariadb:11'
image: "mariadb:11"
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: timelimit
MYSQL_USER: timelimit
MYSQL_PASSWORD: timelimitpassword
volumes:
- ./.database:/var/lib/mysql
- ./.database:/var/lib/mysql
4 changes: 2 additions & 2 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ This endpoint returns the current time of the server
as a Unix timestamp in milliseconds. This does not need
any authentication.

The response is a object with the property ``ms`` whose
The response is a object with the property `ms` whose
value is the timestamp as number.

Example response: ``{"ms":1578311020747}``
Example response: `{"ms":1578311020747}`

## Websocket

Expand Down
Loading