Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add native pipeline workflow #33

Merged
merged 90 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
293d745
Add native pipeline workflow
ablok Mar 15, 2023
3642b5a
Disable automatic triggers to get workflow into main
ablok Mar 15, 2023
7cf835f
Do not limit scope on
ablok Mar 15, 2023
3e43904
Check out native template
ablok Mar 21, 2023
2fd9b91
Combine resource artifacts
ablok Mar 21, 2023
98f529c
Move checkouts to seperate folders
ablok Mar 21, 2023
d18dc0f
Remove yarn cache for tests
ablok Mar 23, 2023
3f936fc
Revert cache removal
ablok Mar 23, 2023
f3bc251
Output yarn cache folder
ablok Mar 23, 2023
cb1dcc8
Disable cache for android tests
ablok Mar 23, 2023
a39a6d0
Get correct apk file from artifacts
ablok Mar 24, 2023
fb79886
Bump detox version
ablok Mar 24, 2023
610e84f
Get more branches
ablok Mar 24, 2023
572509a
Fix detox test runner command
ablok Mar 27, 2023
abaad8c
Fix apk paths
ablok Mar 27, 2023
aebb428
Fix ios app build
ablok Mar 27, 2023
1cc810b
Use a NT branch that should fix iOS app build
Apr 7, 2023
0cad293
Store ios app artifacts
ablok Apr 7, 2023
5c70928
Add ios derivedDataPath option
ablok Apr 11, 2023
46470ea
Store package.json of NT
ablok Apr 18, 2023
1ac0ce0
Fix adding native dependencies
ablok Apr 19, 2023
2ee00c8
Fix iOS app name
ablok Apr 19, 2023
8d58653
Add webview dependency
ablok Apr 20, 2023
fb2163d
Run on all native packages
ablok Apr 24, 2023
522e400
Enable fake timers for video-player unit tests
ablok Apr 24, 2023
b91353f
Pin node version
ablok Apr 24, 2023
df054e9
Added manual trigger to pipeline
NikolaSimsic Nov 14, 2023
657b813
Updated mx version
NikolaSimsic Nov 14, 2023
b8662c0
Updated config
NikolaSimsic Nov 15, 2023
1103ee0
Updated both Dockerfiles to use .net6 binaries
NikolaSimsic Nov 16, 2023
a014d7f
Updated config
NikolaSimsic Nov 16, 2023
dbad1d9
Updated tests
NikolaSimsic Nov 20, 2023
10c57d1
Re-enabled ColumnChart
NikolaSimsic Nov 20, 2023
44dbb0a
Updated screenshots and changed MX version
NikolaSimsic Dec 4, 2023
2de0159
Fixed names and snapshots of expected images
NikolaSimsic Dec 6, 2023
87c7d3b
Updated iOS snapshots and increased SW version to 17.0
NikolaSimsic Dec 6, 2023
d4e7444
Updated mendix version
NikolaSimsic Dec 6, 2023
fcd7548
Updated snapshots and decreased iOS version
NikolaSimsic Dec 7, 2023
cd988a1
Skip flaky tests and updated snapshot
NikolaSimsic Dec 7, 2023
5ae0848
Updated tests
NikolaSimsic Dec 8, 2023
0cf7592
Updated paths for iOS tests and some screenshots
NikolaSimsic Dec 19, 2023
53a5916
Updated config
NikolaSimsic Dec 19, 2023
64758c2
Add native pipeline workflow
ablok Mar 15, 2023
c224fcb
Disable automatic triggers to get workflow into main
ablok Mar 15, 2023
d1f987d
Do not limit scope on
ablok Mar 15, 2023
45e946c
Check out native template
ablok Mar 21, 2023
828b624
Combine resource artifacts
ablok Mar 21, 2023
d7ec15e
Move checkouts to seperate folders
ablok Mar 21, 2023
8626d59
Remove yarn cache for tests
ablok Mar 23, 2023
b8c1c7b
Revert cache removal
ablok Mar 23, 2023
0ae7480
Output yarn cache folder
ablok Mar 23, 2023
05f3084
Disable cache for android tests
ablok Mar 23, 2023
6b25f9e
Get correct apk file from artifacts
ablok Mar 24, 2023
1519bcc
Bump detox version
ablok Mar 24, 2023
ba1974b
Get more branches
ablok Mar 24, 2023
1c675b3
Fix detox test runner command
ablok Mar 27, 2023
1d369fa
Fix apk paths
ablok Mar 27, 2023
17251fd
Fix ios app build
ablok Mar 27, 2023
4feb66a
Use a NT branch that should fix iOS app build
Apr 7, 2023
f2f2b4a
Store ios app artifacts
ablok Apr 7, 2023
4a7755f
Add ios derivedDataPath option
ablok Apr 11, 2023
10cf025
Store package.json of NT
ablok Apr 18, 2023
54b1765
Fix adding native dependencies
ablok Apr 19, 2023
4b48867
Fix iOS app name
ablok Apr 19, 2023
80e639d
Add webview dependency
ablok Apr 20, 2023
9bd98fc
Run on all native packages
ablok Apr 24, 2023
3c11da8
Enable fake timers for video-player unit tests
ablok Apr 24, 2023
5e78550
Added manual trigger to pipeline
NikolaSimsic Nov 14, 2023
e7f6ab9
Updated mx version
NikolaSimsic Nov 14, 2023
c379ac4
Updated config
NikolaSimsic Nov 15, 2023
de95b42
Updated both Dockerfiles to use .net6 binaries
NikolaSimsic Nov 16, 2023
349c67b
Updated config
NikolaSimsic Nov 16, 2023
1f179ad
Updated tests
NikolaSimsic Nov 20, 2023
4b100b8
Re-enabled ColumnChart
NikolaSimsic Nov 20, 2023
8c58f4f
Updated screenshots and changed MX version
NikolaSimsic Dec 4, 2023
c3e7dba
Fixed names and snapshots of expected images
NikolaSimsic Dec 6, 2023
844e007
Updated iOS snapshots and increased SW version to 17.0
NikolaSimsic Dec 6, 2023
8c5adf3
Updated mendix version
NikolaSimsic Dec 6, 2023
71beed9
Updated snapshots and decreased iOS version
NikolaSimsic Dec 7, 2023
e77d7ec
Skip flaky tests and updated snapshot
NikolaSimsic Dec 7, 2023
a0dd1ea
Updated tests
NikolaSimsic Dec 8, 2023
ad097dc
Updated paths for iOS tests and some screenshots
NikolaSimsic Dec 19, 2023
1c67429
Updated config
NikolaSimsic Dec 19, 2023
5d6e0e5
Merge branch 'create-native-pipeline' of github.com:mendix/native-wid…
NikolaSimsic Jan 29, 2024
a86f068
chore: update e2e test native_dependencies.json
UrazAkgultan Feb 2, 2024
bd00606
Merge branch 'create-native-pipeline' of github.com:mendix/native-wid…
NikolaSimsic Feb 5, 2024
e15c63e
Updated screenshot and added wait time since device is slow
NikolaSimsic Feb 6, 2024
8be0367
Merge branch 'main' into create-native-pipeline
NikolaSimsic Feb 6, 2024
fd4a399
Updated config
NikolaSimsic Feb 6, 2024
7cfb373
Merge branch 'create-native-pipeline' of github.com:mendix/native-wid…
NikolaSimsic Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/actions/create-native-bundle/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "Create native bundle"
description: "Create a native bundle for android / iOS"
inputs:
platform:
description: "Target platform (android or ios)"
required: true
mda-file:
description: "Path to the deployment package"
required: true
runs:
using: composite
steps:
- name: "Make sure curl is installed"
run: |
apt update && apt upgrade -y
apt install curl -y
shell: bash
- name: "Download test project"
run: curl -L -o project.zip https://github.com/mendix/Native-Mobile-Resources/archive/refs/heads/main.zip
shell: bash
- name: "Extract test project"
uses: montudor/[email protected]
with:
args: unzip -qq project.zip
- name: "Extract deployment package"
uses: montudor/[email protected]
with:
args: unzip -qq ${{ inputs.mda-file }} -d Native-Mobile-Resources-main/deployment
- name: "Create bundle for ${{ inputs.platform }}"
run: |
mkdir -p ${{ inputs.platform }}/assets
cd Native-Mobile-Resources-main/deployment/native && \
/tmp/mxbuild/modeler/tools/node/linux-x64/node \
/tmp/mxbuild/modeler/tools/node/node_modules/react-native/local-cli/cli.js \
bundle --verbose --platform ${{ inputs.platform }} --dev false \
--config "$PWD/metro.config.json" \
--bundle-output $GITHUB_WORKSPACE/${{ inputs.platform }}/index.${{ inputs.platform }}.bundle \
--assets-dest $GITHUB_WORKSPACE/${{ inputs.platform }}/assets/ \
--entry-file ./index.js
shell: bash
env:
NODE_OPTIONS: --max_old_space_size=6144
- name: "Upload bundle for ${{ inputs.platform }}"
uses: actions/[email protected]
with:
name: ${{ inputs.platform }}-bundle
path: ${{ inputs.platform }}
53 changes: 53 additions & 0 deletions .github/actions/start-runtime/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "Start the runtime"
description: "Start the runtime in preparation of the native e2e tests"
inputs:
mda-file:
description: "Path to the deployment package"
required: true
mendix-version:
description: "Mendix version to use for the runtime"
required: true
runs:
using: composite
steps:
- name: "Setup Python"
uses: actions/[email protected]
with:
python-version: "3.x"
- name: "Install Python dependencies"
run: pip install pyaml httplib2
shell: bash
- name: "Setup Java 11"
id: setup-java
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "11"
- name: "Extract deployment package"
run: |
mkdir project
unzip -qq ${{ inputs.mda-file }} -d project
cp configs/e2e/m2ee-native.yml project/m2ee-native.yml
sed -i -- 's=$ROOT_PATH=${{ github.workspace }}=g' project/m2ee-native.yml
sed -i -- 's=$JAVA_HOME=${{ steps.setup-java.outputs.path }}=g' project/m2ee-native.yml
shell: bash
- name: "Setup m2ee"
run: |
mkdir -p var/log var/opt/m2ee var/run bin tmp
git clone https://github.com/KevinVlaanderen/m2ee-tools.git tmp/m2ee
mv tmp/m2ee/src/* var/opt/m2ee
chmod a=rwx var/log/ var/run/
echo "#!/bin/bash -x" > bin/m2ee
echo "python3 var/opt/m2ee/m2ee.py \$@" >>bin/m2ee
chmod +x bin/m2ee
shell: bash
- name: "Setup mxruntime"
run: |
mkdir -p ${{ github.workspace }}/project/runtimes ${{ github.workspace }}/project/data/model-upload ${{ github.workspace }}/project/data/database ${{ github.workspace }}/project/data/files ${{ github.workspace }}/project/data/tmp
wget -q https://cdn.mendix.com/runtime/mendix-${{ inputs.mendix-version }}.tar.gz -O tmp/runtime.tar.gz
tar xfz tmp/runtime.tar.gz --directory ${{ github.workspace }}/project/runtimes
rm tmp/runtime.tar.gz
shell: bash
- name: "Start mxruntime"
run: bin/m2ee -c ${{ github.workspace }}/project/m2ee-native.yml --verbose --yolo start
shell: bash
28 changes: 28 additions & 0 deletions .github/scripts/mxbuild.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM mcr.microsoft.com/dotnet/runtime:6.0
ARG MENDIX_VERSION

RUN \
echo "Installing Java..." && \
apt-get -qq update && \
apt-get -qq install -y wget libgdiplus && \
wget -q https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \
mkdir /usr/lib/jvm && \
tar xfz /tmp/openjdk.tar.gz --directory /usr/lib/jvm && \
rm /tmp/openjdk.tar.gz
RUN \
echo "Downloading mxbuild ${MENDIX_VERSION}..." && \
wget -q https://cdn.mendix.com/runtime/mxbuild-${MENDIX_VERSION}.tar.gz -O /tmp/mxbuild.tar.gz && \
mkdir /tmp/mxbuild && \
tar xfz /tmp/mxbuild.tar.gz --directory /tmp/mxbuild && \
rm /tmp/mxbuild.tar.gz
RUN \
apt-get -qq remove -y wget && \
apt-get clean
RUN \
echo "#!/bin/bash -x" >/bin/mxbuild && \
echo "dotnet /tmp/mxbuild/modeler/mxbuild.dll --java-home=/usr/lib/jvm/jdk-11.0.2 --java-exe-path=/usr/lib/jvm/jdk-11.0.2/bin/java \$@" >>/bin/mxbuild && \
chmod +x /bin/mxbuild
RUN \
echo "#!/bin/bash -x" >/bin/mx && \
echo "dotnet /tmp/mxbuild/modeler/mx.dll \$@" >>/bin/mx && \
chmod +x /bin/mx
Loading
Loading