Compare commits
No commits in common. "65cdee36e9cb6abb880210bd7a83886532107697" and "a6f19ccd2b1b0708fb294db7feda4526da51f26e" have entirely different histories.
65cdee36e9
...
a6f19ccd2b
@ -1,18 +0,0 @@
|
|||||||
name: Compile the repository
|
|
||||||
on: [pull_request]
|
|
||||||
env:
|
|
||||||
REGISTRY: gitea.brudi.xyz
|
|
||||||
IMAGE_NAME: ${{ gitea.repository }}
|
|
||||||
USER: ${{ gitea.actor }}
|
|
||||||
jobs:
|
|
||||||
compile:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: catthehacker/ubuntu:act-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Run Tests
|
|
||||||
run: docker build --target test .
|
|
||||||
|
|
15
Dockerfile
15
Dockerfile
@ -1,22 +1,11 @@
|
|||||||
FROM node:alpine as files
|
FROM node:alpine as Build
|
||||||
|
ENV NODE_ENV=production
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY [ "package-lock.json", "package.json", "index.ts", "tsconfig.json", "./" ]
|
COPY [ "package-lock.json", "package.json", "index.ts", "tsconfig.json", "./" ]
|
||||||
COPY server ./server
|
COPY server ./server
|
||||||
|
|
||||||
FROM files as proddependencies
|
|
||||||
ENV NODE_ENV=production
|
|
||||||
RUN npm ci --omit=dev
|
RUN npm ci --omit=dev
|
||||||
|
|
||||||
FROM proddependencies as compile
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
CMD ["npm","run","start"]
|
CMD ["npm","run","start"]
|
||||||
|
|
||||||
FROM files as dependencies
|
|
||||||
RUN npm ci
|
|
||||||
|
|
||||||
FROM dependencies as test
|
|
||||||
COPY jest.config.js .
|
|
||||||
COPY tests ./tests
|
|
||||||
|
|
||||||
RUN npm run test
|
|
||||||
|
@ -10,7 +10,7 @@ function getTestDate(date: string): GuildScheduledEvent {
|
|||||||
return <GuildScheduledEvent>{ scheduledStartAt: new Date(date) }
|
return <GuildScheduledEvent>{ scheduledStartAt: new Date(date) }
|
||||||
}
|
}
|
||||||
test('createDateStringFromEvent - correct formatting', () => {
|
test('createDateStringFromEvent - correct formatting', () => {
|
||||||
expect(createDateStringFromEvent(getTestDate('01-01-2023 12:30'), "")).toEqual('heute um 13:30')
|
expect(createDateStringFromEvent(getTestDate('01-01-2023 12:30'), "")).toEqual('heute um 12:30')
|
||||||
expect(createDateStringFromEvent(getTestDate('01-02-2023 12:30'), "")).toEqual('am Montag 02.01 um 13:30')
|
expect(createDateStringFromEvent(getTestDate('01-02-2023 12:30'), "")).toEqual('am Montag 02.01. um 12:30')
|
||||||
expect(createDateStringFromEvent(getTestDate('01-03-2023 12:30'), "")).toEqual('am Dienstag 03.01 um 13:30')
|
expect(createDateStringFromEvent(getTestDate('01-03-2023 12:30'), "")).toEqual('am Dienstag 03.01 um 12:30')
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user