new integration test pipeline

This commit is contained in:
koalasat 2024-09-18 08:52:08 +02:00
parent 36472ea89e
commit d14c3a6f73
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157
5 changed files with 46 additions and 29 deletions

View File

@ -50,20 +50,27 @@ jobs:
export NODE_OPTIONS="--max-old-space-size=4096"
cd frontend
npm run build
- name: 'Archive Web Basic Build Results'
- name: 'Archive Web Static Build Results'
uses: actions/upload-artifact@v4
with:
name: web-main-js
name: web-main-static
path: |
frontend/static/frontend/*main.js
frontend/static/frontend/*.wasm
- name: 'Archive Web PRO Build Results'
frontend/static
frontend/templates/frontend/*.html
- name: 'Archive Node App Static Build Results'
uses: actions/upload-artifact@v4
with:
name: web-pro-js
name: nodeapp-main-static
path: |
frontend/static/frontend/*pro.js
frontend/static/frontend/*.wasm
nodeapp/static
nodeapp/*.html
- name: 'Archive Desktop App Static Build Results'
uses: actions/upload-artifact@v4
with:
name: desktop-main-static
path: |
desktopApp/static
desktopApp/*.html
- name: 'Archive Mobile Build Results'
uses: actions/upload-artifact@v4
with:

View File

@ -30,6 +30,14 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Download static files Artifact'
uses: dawidd6/action-download-artifact@v6
with:
workflow: frontend-build.yml
workflow_conclusion: success
name: web-main-static
path: frontend
- name: Patch Dockerfile and .env-sample
run: |
sed -i "1s/FROM python:.*/FROM python:${{ matrix.python-tag }}/" Dockerfile

11
.gitignore vendored
View File

@ -648,16 +648,15 @@ docs/_site*
node
# frontend statics
frontend/templates/frontend/*.html
mobile/html/Web.bundle/static/*
mobile/html/Web.bundle/index.html
mobile/html/Web.bundle/*.html
desktopApp/static/*
desktopApp/index.html
desktopApp/*.html
web/static/*
web/basic.html
web/pro.html
web/*.html
nodeapp/static/*
nodeapp/basic.html
nodeapp/pro.html
nodeapp/*.html
# Protocol Buffers
api/lightning/*.proto

View File

@ -84,21 +84,23 @@ const configNode: Configuration = {
robosatsSettings: 'desktop-basic',
}),
// Web App HTML
new CopyPlugin({
patterns: [
{
from: path.resolve(__dirname, 'templates/frontend/basic.html'),
to: path.resolve(__dirname, '../web/basic.html'),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
templateParameters: {
pro: false,
},
],
filename: path.resolve(__dirname, '../web/basic.html'),
inject: 'body',
robosatsSettings: 'web-basic',
}),
new CopyPlugin({
patterns: [
{
from: path.resolve(__dirname, 'templates/frontend/pro.html'),
to: path.resolve(__dirname, '../web/pro.html'),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
templateParameters: {
pro: true,
},
],
filename: path.resolve(__dirname, '../web/pro.html'),
inject: 'body',
robosatsSettings: 'web-pro',
}),
// Static files
new CopyPlugin({

View File

@ -11,9 +11,10 @@ class FrontendFetchTest(TestCase):
response = self.client.get(path)
self.assertContains(response, "<html>")
self.assertContains(response, "RoboSats -")
self.assertContains(response, "static/frontend/main.v")
def test_pro_frontend_url_content(self):
path = reverse("pro")
response = self.client.get(path)
self.assertContains(response, "<html>")
self.assertContains(response, "RoboSats PRO -")
self.assertContains(response, "static/frontend/main.v")