Skip to content

Commit

Permalink
Merge branch 'master' into IOBP-527-risolvere-require-cycle-in-cgn
Browse files Browse the repository at this point in the history
  • Loading branch information
mastro993 committed Apr 12, 2024
2 parents 38182e8 + 27c6779 commit 08d2d26
Show file tree
Hide file tree
Showing 1,047 changed files with 101,769 additions and 39,724 deletions.
6 changes: 3 additions & 3 deletions .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ NATIVE_LOGIN_ENABLED=YES
# Fast login max retries
FAST_LOGIN_MAX_RETRIES=3
# Fast login opt-in
FAST_LOGIN_OPTIN=NO
FAST_LOGIN_OPTIN=YES
# Enable CIE login flow with emulator and dev server
CIE_LOGIN_WITH_DEV_SERVER_ENABLED=NO
# Enable CDU flow new screen
CDU_NEW_FLOW=NO
# Relay State for SPID
SPID_RELAY_STATE='appio-dev'
# Wallet V3 RESTful API
WALLET_API_BASEURL='http://127.0.0.1:3000'
# Wallet V3 test/env RESTful API
WALLET_API_UAT_BASEURL='https://api.uat.platform.pagopa.it'
# Redesign of the services section
NEW_SERVICES_ENABLED=NO
4 changes: 2 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ FAST_LOGIN_MAX_RETRIES=3
FAST_LOGIN_OPTIN=YES
# Enable CIE login flow with emulator and dev server
CIE_LOGIN_WITH_DEV_SERVER_ENABLED=NO
# Enable CDU flow new screen
CDU_NEW_FLOW=YES
# Relay State for SPID
SPID_RELAY_STATE='appio'
# Wallet RESTful API
WALLET_API_BASEURL='https://api.platform.pagopa.it'
# Wallet test/env RESTful API
WALLET_API_UAT_BASEURL='https://api.uat.platform.pagopa.it'
# Redesign of the services section
NEW_SERVICES_ENABLED=NO
6 changes: 1 addition & 5 deletions .github/actions/setup-composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ runs:
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- id: install-packages
run: yarn install --frozen-lockfile
shell: bash
Expand Down
13 changes: 12 additions & 1 deletion .github/scripts/run-e2e-tests.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
#!/bin/sh

# Check if the correct number of arguments is provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path_to_e2e_ts_test_file>"
exit 1
fi

# Navigate to the API server directory and start setup
cd _io-dev-api-server_
cp ../scripts/api-config.json config/config.json
yarn
yarn generate
yarn start &> /tmp/io-dev-api-server.log &

# wait for the server to be up and running
sleep 10

cd ..
yarn detox clean-framework-cache
yarn detox build-framework-cache
Expand All @@ -17,4 +28,4 @@ yarn detox test \
--take-screenshots all \
--record-videos failing \
--debug-synchronization 1000 \
--retries 3
--retries 3 "$1"
6 changes: 3 additions & 3 deletions .github/workflows/release-fl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
release-ios:
needs: run-static-checks
environment: prod
runs-on: macos-12
runs-on: macos-13-xlarge
steps:
- id: set-xcode-version
run: sudo xcode-select -s '/Applications/Xcode_14.2.app/Contents/Developer'
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer'
shell: bash
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
Expand All @@ -58,7 +58,7 @@ jobs:
- id: setup
uses: ./.github/actions/setup-composite
- id: setup-ruby
uses: ruby/setup-ruby@d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c #v1.149.0
uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 #v1.173.0
with:
bundler-cache: true
- id: prepare-ios-build
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
release-ios:
needs: run-static-checks
environment: prod
runs-on: macos-12
runs-on: macos-13-xlarge
steps:
- id: set-xcode-version
run: sudo xcode-select -s '/Applications/Xcode_14.2.app/Contents/Developer'
run: sudo xcode-select -s '/Applications/Xcode_15.2.app/Contents/Developer'
shell: bash
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #v3.5.2
Expand All @@ -59,7 +59,7 @@ jobs:
- id: setup
uses: ./.github/actions/setup-composite
- id: setup-ruby
uses: ruby/setup-ruby@d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c #v1.149.0
uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 #v1.173.0
with:
bundler-cache: true
- id: prepare-ios-build
Expand Down Expand Up @@ -90,6 +90,17 @@ jobs:
APP_STORE_API_KEY_ISSUER_ID: ${{secrets.APP_STORE_API_KEY_ISSUER_ID}}
ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD: ${{secrets.ITMSTRANSPORTER_FORCE_ITMS_PACKAGE_UPLOAD}}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
- id: upload-dsym-files
# Sometimes the build-upload-app-store step fails for timeout,
# in this case we want to upload the dSYM files anyway
if: ${{ always() }}
# We don't want to fail whole job if the dSYM upload step fails
continue-on-error: true
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.0.3
with:
name: ItaliaApp.app.dSYM.zip
path: ios/ItaliaApp.app.dSYM.zip
retention-days: 60
notify-new-version:
environment: dev
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staticcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- id: run-test
run: yarn test:ci
- id: codecov-script
run: ./scripts/codecov.sh
run: ./scripts/codecov.sh
71 changes: 56 additions & 15 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Run e2e tests
on:
workflow_dispatch:
push:
branches:
- master
jobs:
run-static-checks:
uses: ./.github/workflows/staticcheck.yaml
run-e2e-test-ios:
uses: ./.github/workflows/staticcheck.yaml
build-detox-app:
needs: run-static-checks
runs-on: macos-latest
environment: dev
runs-on: macos-12
concurrency:
group: ${{ github.workflow }}-e2e-tests-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-e2e-tests-${{ github.ref || github.run_id }}
cancel-in-progress: true
steps:
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- id: setup
uses: ./.github/actions/setup-composite
with:
use-cache: 'true'
- id: setup-ruby
uses: ruby/setup-ruby@d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c # v1.148.0
uses: ruby/setup-ruby@5f19ec79cedfadb78ab837f95b87734d0003c899 #v1.173.0
with:
bundler-cache: true
- id: prepare-dependencies
Expand All @@ -32,9 +34,7 @@ jobs:
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- id: install-detox
- id: install-applesimutils
run: |
brew tap wix/brew
brew install applesimutils
Expand All @@ -46,29 +46,70 @@ jobs:
with:
path: ios/build
key: ${{ runner.os }}-detox-build
restore-keys: |
${{ runner.os }}-detox-build
- id: setup-pods
run: cd ios ; bundle exec pod install --verbose ; cd ..
shell: bash
- id: prepare-detox-build
run: RN_SRC_EXT=e2e.ts yarn detox build -c ios.sim.release
shell: bash
- id: upload-detox-build
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.0.3
with:
name: ItaliaApp.app
path: ios/build/Build/Products/Release-iphonesimulator/ItaliaApp.app
retention-days: 2
run-e2e-tests:
needs: build-detox-app
runs-on: macos-latest
environment: dev
strategy:
fail-fast: false
matrix:
include:
- test: "ts/__e2e__/"
name: "Base_e2e"
- test: "ts/features/bonus/cgn/__e2e__/"
name: "cgn_e2e"
- test: "ts/features/messages/__e2e__/"
name: "messages_e2e"
- test: "ts/features/euCovidCert/__e2e__/"
name: "eucovidcert_e2e"
- test: "ts/features/wallet/onboarding/__e2e__/"
name: "wallet_onboarding_e2e"
steps:
- id: install-applesimutils
run: |
brew tap wix/brew
brew install applesimutils
shell: bash
- id: checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- id: download-detox-build
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
name: ItaliaApp.app
path: ios/build/Build/Products/Release-iphonesimulator/ItaliaApp.app
- id: setup
uses: ./.github/actions/setup-composite
with:
use-cache: 'true'
- id: checkout-dev-server
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
repository: pagopa/io-dev-api-server
path: './_io-dev-api-server_'
- id: run-e2e-tests
run: bash ./.github/scripts/run-e2e-tests.sh
run: bash ./.github/scripts/run-e2e-tests.sh ${{ matrix.test }}
- id: notify-test-failure
if: failure()
uses: ./.github/actions/notify-e2e
env:
TEST: ${{ matrix.name }}
IO_APP_SLACK_HELPER_BOT_TOKEN: ${{ secrets.IO_APP_SLACK_HELPER_BOT_TOKEN }}
- id: upload-artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v.3.1.2
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v.3.1.2
if: always()
with:
name: detox-artifacts
path: /tmp/e2e_artifacts/
name: detox-artifacts-${{ matrix.name }}
path: /tmp/e2e_artifacts/
retention-days: 2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ local.properties
*.iml
*.hprof
Google Play Android Developer-04750d2c0cf8.json
.cxx/

**/fastlane/report.xml
**/fastlane/Preview.html
Expand Down
4 changes: 0 additions & 4 deletions .hound.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.19.0
18.19.0

0 comments on commit 08d2d26

Please sign in to comment.