mirror of
https://github.com/selfxyz/self.git
synced 2026-01-09 14:48:06 -05:00
small collection bugfixes for two point nine (#1446)
* fix addhaar typo * consolidate mobile app links and add tests * fix caching issues for pipelines * fix gitleaks * update binary merkle root.circom package source * fix cache * update path * rename lockfile * fix qrcode error * fix mobile ci tests and prettier * fix qr code typing * fix qrcode pipelines * fix integration test
This commit is contained in:
12
.github/actions/cache-bundler/action.yml
vendored
12
.github/actions/cache-bundler/action.yml
vendored
@@ -24,12 +24,22 @@ outputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: get-hash
|
||||
name: Hash lock file
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -f "${{ inputs.lock-file }}" ]; then
|
||||
echo "hash=$(shasum -a 256 "${{ inputs.lock-file }}" | awk '{ print $1 }')" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::warning::Lock file '${{ inputs.lock-file }}' not found."
|
||||
echo "hash=no-lock-file" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- id: cache
|
||||
name: Cache Ruby gems
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ inputs.path }}
|
||||
key: ${{ runner.os }}-gems-${{ inputs.cache-version }}-${{ hashFiles(inputs.lock-file) }}
|
||||
key: ${{ runner.os }}-gems-${{ inputs.cache-version }}-${{ steps.get-hash.outputs.hash }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-${{ inputs.cache-version }}-
|
||||
${{ runner.os }}-gems-
|
||||
|
||||
2
.github/actions/cache-gradle/action.yml
vendored
2
.github/actions/cache-gradle/action.yml
vendored
@@ -29,7 +29,7 @@ runs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ inputs.path }}
|
||||
key: ${{ runner.os }}-gradle-${{ inputs.cache-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
key: ${{ runner.os }}-gradle-${{ inputs.cache-version }}-${{ hashFiles('**/build.gradle', '**/settings.gradle', '**/gradle-wrapper.properties', '**/gradle.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-${{ inputs.cache-version }}-
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
4
.github/actions/cache-pods/action.yml
vendored
4
.github/actions/cache-pods/action.yml
vendored
@@ -9,7 +9,7 @@ inputs:
|
||||
default: |
|
||||
ios/Pods
|
||||
~/Library/Caches/CocoaPods
|
||||
lock-file:
|
||||
lockfile:
|
||||
description: Path to Podfile.lock
|
||||
required: false
|
||||
default: ios/Podfile.lock
|
||||
@@ -31,7 +31,7 @@ runs:
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ inputs.path }}
|
||||
key: ${{ runner.os }}-pods-${{ inputs.cache-version }}-${{ hashFiles(inputs.lock-file) }}
|
||||
key: ${{ runner.os }}-pods-${{ inputs.cache-version }}-${{ hashFiles(inputs.lockfile) }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pods-${{ inputs.cache-version }}-
|
||||
${{ runner.os }}-pods-
|
||||
|
||||
12
.github/actions/cache-yarn/action.yml
vendored
12
.github/actions/cache-yarn/action.yml
vendored
@@ -25,12 +25,22 @@ outputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: get-hash
|
||||
name: Hash lock file
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -f "${{ inputs.lock-file }}" ]; then
|
||||
echo "hash=$(shasum -a 256 "${{ inputs.lock-file }}" | awk '{ print $1 }')" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "::warning::Lock file '${{ inputs.lock-file }}' not found."
|
||||
echo "hash=no-lock-file" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
- id: cache
|
||||
name: Cache Yarn dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ inputs.path }}
|
||||
key: ${{ runner.os }}-yarn-${{ inputs.cache-version }}-${{ hashFiles(inputs.lock-file) }}
|
||||
key: ${{ runner.os }}-yarn-${{ inputs.cache-version }}-${{ steps.get-hash.outputs.hash }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-${{ inputs.cache-version }}-
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
25
.github/actions/yarnrc-hash/action.yml
vendored
Normal file
25
.github/actions/yarnrc-hash/action.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Compute .yarnrc.yml hash
|
||||
|
||||
description: Compute a stable hash for .yarnrc.yml to use in cache keys.
|
||||
|
||||
outputs:
|
||||
hash:
|
||||
description: Hash of .yarnrc.yml (or "no-yarnrc" if the file is missing)
|
||||
value: ${{ steps.compute-yarnrc-hash.outputs.hash }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Compute .yarnrc.yml hash
|
||||
id: compute-yarnrc-hash
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -f .yarnrc.yml ]; then
|
||||
if command -v shasum >/dev/null 2>&1; then
|
||||
echo "hash=$(shasum -a 256 .yarnrc.yml | awk '{ print $1 }')" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "hash=$(sha256sum .yarnrc.yml | awk '{ print $1 }')" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
else
|
||||
echo "hash=no-yarnrc" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
45
.github/workflows/mobile-bundle-analysis.yml
vendored
45
.github/workflows/mobile-bundle-analysis.yml
vendored
@@ -37,32 +37,26 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Cache Node Modules
|
||||
uses: actions/cache@v4
|
||||
- name: Cache Yarn
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
path: |
|
||||
.yarn/cache
|
||||
node_modules
|
||||
app/node_modules
|
||||
key: ${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
|
||||
- name: Cache Ruby Bundler
|
||||
uses: actions/cache@v4
|
||||
cache-version: node-${{ env.NODE_VERSION_SANITIZED }}
|
||||
- name: Cache Bundler
|
||||
uses: ./.github/actions/cache-bundler
|
||||
with:
|
||||
path: app/vendor/bundle
|
||||
key: ${{ runner.os }}-ruby${{ env.RUBY_VERSION }}-gems-${{ hashFiles('app/Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ruby${{ env.RUBY_VERSION }}-gems-
|
||||
lock-file: app/Gemfile.lock
|
||||
cache-version: ruby${{ env.RUBY_VERSION }}
|
||||
- name: Cache Gradle
|
||||
uses: actions/cache@v4
|
||||
uses: ./.github/actions/cache-gradle
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('app/android/**/gradle-wrapper.properties', 'app/android/**/gradle-wrapper.jar') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Install Mobile Dependencies
|
||||
uses: ./.github/actions/mobile-setup
|
||||
with:
|
||||
@@ -100,30 +94,25 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- name: Cache Node Modules
|
||||
uses: actions/cache@v4
|
||||
- name: Cache Yarn
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
path: |
|
||||
.yarn/cache
|
||||
node_modules
|
||||
app/node_modules
|
||||
key: ${{ runner.os }}-node${{ env.NODE_VERSION }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node${{ env.NODE_VERSION }}-yarn-
|
||||
- name: Cache Ruby Bundler
|
||||
uses: actions/cache@v4
|
||||
cache-version: node-${{ env.NODE_VERSION_SANITIZED }}
|
||||
- name: Cache Bundler
|
||||
uses: ./.github/actions/cache-bundler
|
||||
with:
|
||||
path: app/vendor/bundle
|
||||
key: ${{ runner.os }}-ruby${{ env.RUBY_VERSION }}-gems-${{ hashFiles('app/Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ruby${{ env.RUBY_VERSION }}-gems-
|
||||
lock-file: app/Gemfile.lock
|
||||
cache-version: ruby${{ env.RUBY_VERSION }}
|
||||
- name: Cache CocoaPods
|
||||
uses: actions/cache@v4
|
||||
uses: ./.github/actions/cache-pods
|
||||
with:
|
||||
path: app/ios/Pods
|
||||
key: ${{ runner.os }}-pods-${{ hashFiles('app/ios/Podfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pods-
|
||||
lock-file: app/ios/Podfile.lock
|
||||
- name: Install Mobile Dependencies
|
||||
uses: ./.github/actions/mobile-setup
|
||||
with:
|
||||
|
||||
12
.github/workflows/mobile-deploy.yml
vendored
12
.github/workflows/mobile-deploy.yml
vendored
@@ -367,6 +367,10 @@ jobs:
|
||||
echo "Xcode path:"
|
||||
xcode-select -p
|
||||
|
||||
- name: Compute .yarnrc.yml hash
|
||||
id: yarnrc-hash
|
||||
uses: ./.github/actions/yarnrc-hash
|
||||
|
||||
- name: Cache Yarn artifacts
|
||||
id: yarn-cache
|
||||
uses: ./.github/actions/cache-yarn
|
||||
@@ -375,7 +379,7 @@ jobs:
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
.yarn/unplugged
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('.yarnrc.yml') }}
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ steps.yarnrc-hash.outputs.hash }}
|
||||
|
||||
- name: Cache Ruby gems
|
||||
id: gems-cache
|
||||
@@ -976,6 +980,10 @@ jobs:
|
||||
# Use version-manager script to apply versions
|
||||
node ${{ env.APP_PATH }}/scripts/version-manager.cjs apply "$VERSION" "$IOS_BUILD" "$ANDROID_BUILD"
|
||||
|
||||
- name: Compute .yarnrc.yml hash
|
||||
id: yarnrc-hash
|
||||
uses: ./.github/actions/yarnrc-hash
|
||||
|
||||
- name: Cache Yarn artifacts
|
||||
id: yarn-cache
|
||||
uses: ./.github/actions/cache-yarn
|
||||
@@ -984,7 +992,7 @@ jobs:
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
.yarn/unplugged
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('.yarnrc.yml') }}
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ steps.yarnrc-hash.outputs.hash }}
|
||||
|
||||
- name: Cache Ruby gems
|
||||
id: gems-cache
|
||||
|
||||
10
.github/workflows/mobile-e2e.yml
vendored
10
.github/workflows/mobile-e2e.yml
vendored
@@ -56,6 +56,9 @@ jobs:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- run: corepack enable
|
||||
- run: corepack prepare yarn@4.6.0 --activate
|
||||
- name: Compute .yarnrc.yml hash
|
||||
id: yarnrc-hash
|
||||
uses: ./.github/actions/yarnrc-hash
|
||||
- name: Cache Yarn dependencies
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
@@ -63,7 +66,7 @@ jobs:
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
.yarn/unplugged
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('.yarnrc.yml') }}
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ steps.yarnrc-hash.outputs.hash }}
|
||||
- name: Toggle Yarn hardened mode for trusted PRs
|
||||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }}
|
||||
run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV
|
||||
@@ -246,6 +249,9 @@ jobs:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
- run: corepack enable
|
||||
- run: corepack prepare yarn@4.6.0 --activate
|
||||
- name: Compute .yarnrc.yml hash
|
||||
id: yarnrc-hash
|
||||
uses: ./.github/actions/yarnrc-hash
|
||||
- name: Cache Yarn dependencies
|
||||
uses: ./.github/actions/cache-yarn
|
||||
with:
|
||||
@@ -253,7 +259,7 @@ jobs:
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
.yarn/unplugged
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('.yarnrc.yml') }}
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ steps.yarnrc-hash.outputs.hash }}
|
||||
- name: Toggle Yarn hardened mode for trusted PRs
|
||||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }}
|
||||
run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV
|
||||
|
||||
2
.github/workflows/npm-publish.yml
vendored
2
.github/workflows/npm-publish.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
id-token: write # Required for OIDC
|
||||
id-token: write # Required for OIDC
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
|
||||
4
.github/workflows/qrcode-sdk-ci.yml
vendored
4
.github/workflows/qrcode-sdk-ci.yml
vendored
@@ -68,6 +68,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
yarn workspace @selfxyz/common build
|
||||
yarn workspace @selfxyz/sdk-common build
|
||||
yarn workspace @selfxyz/qrcode build
|
||||
|
||||
- name: Cache build artifacts
|
||||
@@ -258,6 +259,9 @@ jobs:
|
||||
key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Build SDK common dependency
|
||||
run: yarn workspace @selfxyz/sdk-common build
|
||||
|
||||
- name: Run tests
|
||||
run: yarn workspace @selfxyz/qrcode test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user