mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 02:46:28 +00:00
new integration test pipeline
This commit is contained in:
parent
36472ea89e
commit
d14c3a6f73
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"
|
||||
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:
|
||||
|
8
.github/workflows/integration-tests.yml
vendored
8
.github/workflows/integration-tests.yml
vendored
@ -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
11
.gitignore
vendored
@ -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
|
||||
|
@ -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({
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user