Skip to content

Commit

Permalink
2623 Add LFA Submodule (#2641)
Browse files Browse the repository at this point in the history
* add lfa submodule

* add build scripts

* point to feature branch

* update package.lock

* try disabling cache

* checkout submodule with action

* limit caching to our packages

* remove caching all together

* temp disable electron custom version

* try only installing prod dependencies

* align electron versions to allow removing custom version variable

* fix package-lock.json
  • Loading branch information
adrastaea authored Oct 28, 2024
1 parent 2f1f448 commit 710d65a
Show file tree
Hide file tree
Showing 32 changed files with 152 additions and 33 deletions.
8 changes: 6 additions & 2 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
- uses: actions/setup-node@master
with:
node-version: 18.12.1

- name: Set up Python 3.12
uses: actions/setup-python@v5
if: runner.os == 'macOS'
Expand Down Expand Up @@ -55,7 +55,7 @@ runs:
with:
path: |
node_modules
*/*/node_modules
packages/*/node_modules
key: ${{ inputs.cachePrefix }}-${{ runner.OS }}-npm-cache-${{ hashFiles('packages/*/package-lock.json') }}
restore-keys: |
${{ inputs.cachePrefix }}-${{ runner.OS }}-npm-cache-
Expand All @@ -65,6 +65,10 @@ runs:
run: npm ci
shell: bash

- name: "Build submodules"
run: npm run build:auth
shell: bash

- name: "Bootstrap project"
run: |
if [[ ! -z "${{ inputs.bootstrap-packages }}" ]]
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.backend == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -30,6 +30,8 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.backend == 'true'
with:
submodules: 'recursive'

- name: "Setup environment"
if: steps.filter.outputs.backend == 'true'
Expand Down Expand Up @@ -58,7 +60,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.backend == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -67,6 +69,8 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.backend == 'true'
with:
submodules: 'recursive'

- name: "Setup environment"
if: steps.filter.outputs.backend == 'true'
Expand Down Expand Up @@ -95,7 +99,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.backend == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -104,6 +108,8 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.backend == 'true'
with:
submodules: 'recursive'

- name: "Setup environment"
if: steps.filter.outputs.backend == 'true'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-desktop-visual-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.desktop == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -32,6 +32,7 @@ jobs:
if: steps.filter.outputs.desktop == 'true'
with:
fetch-depth: 0 # Required to retrieve git history
submodules: 'recursive'

- name: Setup environment
uses: ./.github/actions/setup-env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: "Remove test files workaround (jest types conflicting with cypress types)"
if: ${{ runner.os == 'Windows' }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
submodules: 'recursive'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down Expand Up @@ -70,4 +72,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9
with:
category: "/language:${{matrix.language}}"
category: "/language:${{matrix.language}}"
3 changes: 3 additions & 0 deletions .github/workflows/depencency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ jobs:
steps:
- name: 'Checkout Repository'
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
submodules: 'recursive'

- name: 'Dependency Review'
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
6 changes: 6 additions & 0 deletions .github/workflows/desktop-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: Setup environment
uses: ./.github/actions/setup-env
Expand Down Expand Up @@ -106,6 +108,8 @@ jobs:

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- uses: actions-rs/components-nightly@254194ebf6ba07d2bb7cec8be76cee368d44fb90 # v1.1.1
with:
Expand Down Expand Up @@ -180,6 +184,8 @@ jobs:

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: "Fetch jsign"
shell: bash
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/desktop-rtl-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.validFiles == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -32,6 +32,8 @@ jobs:

- uses: actions/checkout@v3
if: steps.filter.outputs.validFiles == 'true'
with:
submodules: 'recursive'

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/desktop-test-scroll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.desktop == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -31,6 +31,8 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.desktop == 'true'
with:
submodules: 'recursive'

- name: Setup environment
uses: ./.github/actions/setup-env
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/desktop-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.desktop == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -31,6 +31,8 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.desktop == 'true'
with:
submodules: 'recursive'

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/e2e-android-self.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Detox E2E Android (self-hosted)

on:
push:
paths:
paths:
- packages/mobile/**
- packages/backend/**
- packages/state-manager/**
Expand All @@ -15,6 +15,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install dependencies
run: |
Expand Down Expand Up @@ -52,5 +54,5 @@ jobs:
detox test starter -c android.emu.debug.ci
- name: Stop metro
if: always()
if: always()
run: pm2 stop METRO
1 change: 1 addition & 0 deletions .github/workflows/e2e-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
lfs: true

- uses: actions/setup-node@master
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/e2e-ios-self.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Detox E2E iOS (self-hosted)

on:
# push:
# paths:
# paths:
# - packages/mobile/**
# - packages/backend/**
# - packages/state-manager/**
Expand All @@ -16,6 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
lfs: true

- name: Install dependencies
Expand Down Expand Up @@ -47,5 +48,5 @@ jobs:
detox test starter -c ios.sim.debug.ci
- name: Stop metro
if: always()
if: always()
run: pm2 stop METRO
1 change: 1 addition & 0 deletions .github/workflows/e2e-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
lfs: true

- uses: actions/setup-node@master
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
timeout-minutes: 180

env:
ELECTRON_CUSTOM_VERSION: 23.0.0
DISPLAY: ":99.0"
TEST_MODE: true
IS_CI: true

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: Install WM
run: sudo apt install fluxbox
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ jobs:
runs-on: macos-12
timeout-minutes: 180
env:
ELECTRON_CUSTOM_VERSION: 23.0.0
TEST_MODE: true
IS_E2E: true
IS_CI: true

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/e2e-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ jobs:
timeout-minutes: 180

env:
ELECTRON_CUSTOM_VERSION: 23.0.0
TEST_MODE: true
E2E: true
IS_CI: true

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand Down Expand Up @@ -92,28 +93,28 @@ jobs:
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test oneClient.test.ts

- name: Run user profile test
uses: nick-fields/retry@v2
with:
timeout_minutes: 25
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test userProfile.test.ts

- name: Run invitation link test - Includes 2 separate application clients
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test invitationLink.test.ts


- name: Run multiple clients test
uses: nick-fields/retry@14672906e672a08bd6eeb15720e9ed3ce869cdd4 # v2.9.0
with:
timeout_minutes: 30
max_attempts: 3
shell: bash
command: cd packages/e2e-tests && npm run test multipleClients.test.ts
command: cd packages/e2e-tests && npm run test multipleClients.test.ts
4 changes: 3 additions & 1 deletion .github/workflows/identity-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: "Skip tests"
if: steps.filter.outputs.identity == 'false'
run: |
echo "Skipping test run"
echo "Skipping test run"
exit 0
- name: "Print OS"
Expand All @@ -31,6 +31,8 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
if: steps.filter.outputs.identity == 'true'
with:
submodules: 'recursive'

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: "Setup environment"
uses: ./.github/actions/setup-env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mobile-build-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
run: echo ${{ matrix.os }}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: 'recursive'

- name: "Set up JDK"
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
Expand Down
Loading

0 comments on commit 710d65a

Please sign in to comment.