-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hamid
committed
Nov 30, 2023
1 parent
95fb850
commit de2c4ad
Showing
5 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: friday | ||
time: "10:00" | ||
timezone: Europe/London | ||
open-pull-requests-limit: 10 |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Client Build | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
env: | ||
DOCKER_BUILDKIT: 1 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
run: docker build -o ./artifacts/test-results --target test-result . | ||
|
||
- name: Publish Test Results | ||
uses: actions/[email protected] | ||
with: | ||
name: TestReport | ||
path: ./artifacts/test-results/ | ||
|
||
# - name: Build | ||
# if: github.ref == 'refs/heads/main' | ||
# run: docker build -t image . && docker save image -o artifacts\image.tar |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM node:20.10.0-slim as build | ||
|
||
RUN apt-get update && apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb jq -y | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
RUN npm ci | ||
|
||
COPY . . | ||
RUN npm run lint && npm run build | ||
|
||
FROM build as test | ||
RUN npm run test-component:headless && npm run test-e2e:headless | ||
|
||
FROM scratch as test-result | ||
COPY --from=test /app/coverage / | ||
|
||
FROM nginx:1.25-alpine-slim as deployment | ||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf | ||
CMD ["/bin/sh", "-c", "nginx -g 'daemon off;'"] | ||
COPY --from=build /app/dist /usr/share/nginx/html |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
server { | ||
gzip on; | ||
gzip_static on; | ||
gzip_http_version 1.0; | ||
gzip_comp_level 2; | ||
gzip_proxied any; | ||
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; | ||
gunzip on; | ||
http2 on; | ||
listen 80; | ||
server_name _; | ||
|
||
root /usr/share/nginx/html; | ||
|
||
location ~* ^.+\.map$ { | ||
deny all; | ||
return 404; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} |
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