mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-23 21:53:30 +00:00
new integration test pipeline
This commit is contained in:
23
.github/workflows/frontend-build.yml
vendored
23
.github/workflows/frontend-build.yml
vendored
@ -50,20 +50,27 @@ jobs:
|
|||||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||||
cd frontend
|
cd frontend
|
||||||
npm run build
|
npm run build
|
||||||
- name: 'Archive Web Basic Build Results'
|
- name: 'Archive Web Static Build Results'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: web-main-js
|
name: web-main-static
|
||||||
path: |
|
path: |
|
||||||
frontend/static/frontend/*main.js
|
frontend/static
|
||||||
frontend/static/frontend/*.wasm
|
frontend/templates/frontend/*.html
|
||||||
- name: 'Archive Web PRO Build Results'
|
- name: 'Archive Node App Static Build Results'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: web-pro-js
|
name: nodeapp-main-static
|
||||||
path: |
|
path: |
|
||||||
frontend/static/frontend/*pro.js
|
nodeapp/static
|
||||||
frontend/static/frontend/*.wasm
|
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'
|
- name: 'Archive Mobile Build Results'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
8
.github/workflows/integration-tests.yml
vendored
8
.github/workflows/integration-tests.yml
vendored
@ -30,6 +30,14 @@ jobs:
|
|||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Patch Dockerfile and .env-sample
|
||||||
run: |
|
run: |
|
||||||
sed -i "1s/FROM python:.*/FROM python:${{ matrix.python-tag }}/" Dockerfile
|
sed -i "1s/FROM python:.*/FROM python:${{ matrix.python-tag }}/" Dockerfile
|
||||||
|
11
.gitignore
vendored
11
.gitignore
vendored
@ -648,16 +648,15 @@ docs/_site*
|
|||||||
node
|
node
|
||||||
|
|
||||||
# frontend statics
|
# frontend statics
|
||||||
|
frontend/templates/frontend/*.html
|
||||||
mobile/html/Web.bundle/static/*
|
mobile/html/Web.bundle/static/*
|
||||||
mobile/html/Web.bundle/index.html
|
mobile/html/Web.bundle/*.html
|
||||||
desktopApp/static/*
|
desktopApp/static/*
|
||||||
desktopApp/index.html
|
desktopApp/*.html
|
||||||
web/static/*
|
web/static/*
|
||||||
web/basic.html
|
web/*.html
|
||||||
web/pro.html
|
|
||||||
nodeapp/static/*
|
nodeapp/static/*
|
||||||
nodeapp/basic.html
|
nodeapp/*.html
|
||||||
nodeapp/pro.html
|
|
||||||
|
|
||||||
# Protocol Buffers
|
# Protocol Buffers
|
||||||
api/lightning/*.proto
|
api/lightning/*.proto
|
||||||
|
@ -84,21 +84,23 @@ const configNode: Configuration = {
|
|||||||
robosatsSettings: 'desktop-basic',
|
robosatsSettings: 'desktop-basic',
|
||||||
}),
|
}),
|
||||||
// Web App HTML
|
// Web App HTML
|
||||||
new CopyPlugin({
|
new HtmlWebpackPlugin({
|
||||||
patterns: [
|
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
|
||||||
{
|
templateParameters: {
|
||||||
from: path.resolve(__dirname, 'templates/frontend/basic.html'),
|
pro: false,
|
||||||
to: path.resolve(__dirname, '../web/basic.html'),
|
},
|
||||||
},
|
filename: path.resolve(__dirname, '../web/basic.html'),
|
||||||
],
|
inject: 'body',
|
||||||
|
robosatsSettings: 'web-basic',
|
||||||
}),
|
}),
|
||||||
new CopyPlugin({
|
new HtmlWebpackPlugin({
|
||||||
patterns: [
|
template: path.resolve(__dirname, 'templates/frontend/index.ejs'),
|
||||||
{
|
templateParameters: {
|
||||||
from: path.resolve(__dirname, 'templates/frontend/pro.html'),
|
pro: true,
|
||||||
to: path.resolve(__dirname, '../web/pro.html'),
|
},
|
||||||
},
|
filename: path.resolve(__dirname, '../web/pro.html'),
|
||||||
],
|
inject: 'body',
|
||||||
|
robosatsSettings: 'web-pro',
|
||||||
}),
|
}),
|
||||||
// Static files
|
// Static files
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
|
@ -11,9 +11,10 @@ class FrontendFetchTest(TestCase):
|
|||||||
response = self.client.get(path)
|
response = self.client.get(path)
|
||||||
self.assertContains(response, "<html>")
|
self.assertContains(response, "<html>")
|
||||||
self.assertContains(response, "RoboSats -")
|
self.assertContains(response, "RoboSats -")
|
||||||
|
self.assertContains(response, "static/frontend/main.v")
|
||||||
|
|
||||||
def test_pro_frontend_url_content(self):
|
def test_pro_frontend_url_content(self):
|
||||||
path = reverse("pro")
|
path = reverse("pro")
|
||||||
response = self.client.get(path)
|
response = self.client.get(path)
|
||||||
self.assertContains(response, "<html>")
|
self.assertContains(response, "<html>")
|
||||||
self.assertContains(response, "RoboSats PRO -")
|
self.assertContains(response, "static/frontend/main.v")
|
||||||
|
Reference in New Issue
Block a user