diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml index de3200c8..49ee2272 100644 --- a/.github/actions/setup-environment/action.yml +++ b/.github/actions/setup-environment/action.yml @@ -26,6 +26,7 @@ runs: key: ${{ runner.os }}-${{ env.cache-name }}${{ inputs.yarn-workspaces-focus && format('-{0}', inputs.yarn-workspaces-focus) || '' }}-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }}${{ inputs.yarn-workspaces-focus && format('-{0}', inputs.yarn-workspaces-focus) || '' }}- + save-always: true - name: Install dependencies if: ${{ inputs.skip-yarn-install != 'true' }} shell: bash diff --git a/.github/workflows/build_app.yml b/.github/workflows/build_app.yml index e62dd092..1762e2f5 100644 --- a/.github/workflows/build_app.yml +++ b/.github/workflows/build_app.yml @@ -1,4 +1,4 @@ -name: Build App +name: Build App (Old) run-name: ${{ format('Build {0}{1}', github.event.inputs.branch, github.event.inputs.notes && format(' - {0}', github.event.inputs.notes)) }} on: workflow_dispatch: @@ -156,51 +156,40 @@ jobs: run: | [ -n "$REF_NAME" ] && git checkout -b "ci/$REF_NAME" git status - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: app-node_modules - with: - path: App/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn install - run: | - cd App - yarn install + - name: Setup Environment + uses: ./.github/actions/setup-environment - name: Get Changelog uses: actions/download-artifact@v3 with: name: changelog - path: App + path: apps/mobile-app - name: Prepare Keystore run: | mkdir -p ~/.gradle echo "${{ secrets.GRADLE_PROPERTIES }}" > ~/.gradle/gradle.properties - mkdir -p App/android/app - echo "${{ secrets.DEV_KEYSTORE_BASE64 }}" > App/android/app/dev.keystore.base64 - base64 --decode App/android/app/dev.keystore.base64 > App/android/app/dev.keystore + mkdir -p apps/mobile-app/android/app + echo "${{ secrets.DEV_KEYSTORE_BASE64 }}" > apps/mobile-app/android/app/dev.keystore.base64 + base64 --decode apps/mobile-app/android/app/dev.keystore.base64 > apps/mobile-app/android/app/dev.keystore - name: Build Android run: | - cd App + cd apps/mobile-app cd android ./gradlew assembleRelease - name: Upload Built APK uses: actions/upload-artifact@v3 with: name: android-app-apk - path: App/android/app/build/outputs/apk/release/app-release.apk + path: apps/mobile-app/android/app/build/outputs/apk/release/app-release.apk - name: Write Android build info run: | - cd App/android + cd apps/mobile-app/android echo '{}' > android_build_info.json - name: Upload Android build info uses: actions/upload-artifact@v3 with: name: android-build-info path: | - App/android/android_build_info.json + apps/mobile-app/android/android_build_info.json build-ios-nightly: name: "Build iOS Nightly" @@ -263,49 +252,40 @@ jobs: run: | [ -n "$REF_NAME" ] && git checkout -b "ci/$REF_NAME" git status - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: app-node_modules - with: - path: App/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn install - run: | - cd App - yarn install + - name: Setup Environment + uses: ./.github/actions/setup-environment - name: Get Changelog uses: actions/download-artifact@v3 with: name: changelog - path: App + path: apps/mobile-app - name: Prepare config.xcconfig run: | - echo "${{ secrets.CONFIG_XCCONFIG }}" > App/ios/config.xcconfig - echo "MARKETING_VERSION = 0.1.2" >> App/ios/config.xcconfig - echo "CURRENT_PROJECT_VERSION = 10" >> App/ios/config.xcconfig + echo "${{ secrets.CONFIG_XCCONFIG }}" > apps/mobile-app/ios/config.xcconfig + echo "MARKETING_VERSION = 0.1.2" >> apps/mobile-app/ios/config.xcconfig + echo "CURRENT_PROJECT_VERSION = 10" >> apps/mobile-app/ios/config.xcconfig echo "${{ secrets.AUTHKEY_P8_BASE64 }}" > ~/AuthKey.p8.base64 base64 --decode ~/AuthKey.p8.base64 > ~/AuthKey.p8 - name: Cache Pods - uses: actions/cache@v3 + uses: actions/cache@v4 env: - cache-name: app-pods + cache-name: app-pods-202402 with: - path: App/ios/Pods - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/ios/Podfile.lock') }} + path: apps/mobile-app/ios/Pods + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('apps/mobile-app/ios/Podfile.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }}- + save-always: true - name: Pod install env: USE_BUILDCACHE: true run: | - cd App + cd apps/mobile-app + gem install cocoapods -v 1.15.2 # https://github.com/CocoaPods/CocoaPods/issues/12226#issuecomment-1930604302 bash scripts/pod-install.sh - name: Install Fastlane run: | - cd App/ios + cd apps/mobile-app/ios bundle install # Patch cert_checker.rb to not print out sensitive information. # See: https://github.com/fastlane/fastlane/issues/21351 @@ -333,7 +313,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.SYNC_CODE_SIGNING_GIT_PASSPHRASE }} SKIP_UPLOAD_TO_TESTFLIGHT: true run: | - cd App/ios + cd apps/mobile-app/ios bundle exec fastlane nightly - name: Show error log if: ${{ failure() }} @@ -345,7 +325,7 @@ jobs: env: CI: true run: | - cd App/ios + cd apps/mobile-app/ios bundle exec fastlane lane_upload_to_testflight cp ci_output_data.json ios_appstore_upload_info_nightly.json - name: Upload App Store Upload Info @@ -353,16 +333,16 @@ jobs: with: name: ios-appstore-upload-info-nightly path: | - App/ios/ios_appstore_upload_info_nightly.json + apps/mobile-app/ios/ios_appstore_upload_info_nightly.json - name: Upload Archive uses: actions/upload-artifact@v3 with: name: ios-archive-nightly path: | - App/ios/*.xcarchive - App/ios/*.xcarchive.zip - App/*.xcarchive - App/*.xcarchive.zip + apps/mobile-app/ios/*.xcarchive + apps/mobile-app/ios/*.xcarchive.zip + apps/mobile-app/*.xcarchive + apps/mobile-app/*.xcarchive.zip build-ios-release: name: "Build iOS Release" @@ -426,49 +406,39 @@ jobs: run: | [ -n "$REF_NAME" ] && git checkout -b "ci/$REF_NAME" git status - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: app-node_modules - with: - path: App/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn install - run: | - cd App - yarn install + - name: Setup Environment + uses: ./.github/actions/setup-environment - name: Get Changelog uses: actions/download-artifact@v3 with: name: changelog - path: App + path: apps/mobile-app - name: Prepare config.xcconfig run: | - echo "${{ secrets.CONFIG_XCCONFIG }}" > App/ios/config.xcconfig - echo "MARKETING_VERSION = 0.1.2" >> App/ios/config.xcconfig - echo "CURRENT_PROJECT_VERSION = 10" >> App/ios/config.xcconfig + echo "${{ secrets.CONFIG_XCCONFIG }}" > apps/mobile-app/ios/config.xcconfig + echo "MARKETING_VERSION = 0.1.2" >> apps/mobile-app/ios/config.xcconfig + echo "CURRENT_PROJECT_VERSION = 10" >> apps/mobile-app/ios/config.xcconfig echo "${{ secrets.AUTHKEY_P8_BASE64 }}" > ~/AuthKey.p8.base64 base64 --decode ~/AuthKey.p8.base64 > ~/AuthKey.p8 - name: Cache Pods - uses: actions/cache@v3 + uses: actions/cache@v4 env: - cache-name: app-pods + cache-name: app-pods-202402 with: - path: App/ios/Pods - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/ios/Podfile.lock') }} + path: apps/mobile-app/ios/Pods + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('apps/mobile-app/ios/Podfile.lock') }} restore-keys: | ${{ runner.os }}-${{ env.cache-name }}- + save-always: true - name: Pod install env: USE_BUILDCACHE: true run: | - cd App + cd apps/mobile-app bash scripts/pod-install.sh - name: Install Fastlane run: | - cd App/ios + cd apps/mobile-app/ios bundle install # Patch cert_checker.rb to not print out sensitive information. # See: https://github.com/fastlane/fastlane/issues/21351 @@ -496,7 +466,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.SYNC_CODE_SIGNING_GIT_PASSPHRASE }} SKIP_UPLOAD_TO_TESTFLIGHT: true run: | - cd App/ios + cd apps/mobile-app/ios bundle exec fastlane release - name: Show error log if: ${{ failure() && github.event_name == 'release' }} @@ -508,7 +478,7 @@ jobs: env: CI: true run: | - cd App/ios + cd apps/mobile-app/ios bundle exec fastlane lane_upload_to_testflight cp ci_output_data.json ios_appstore_upload_info_release.json - name: Upload App Store Upload Info @@ -516,16 +486,16 @@ jobs: with: name: ios-appstore-upload-info-release path: | - App/ios/ios_appstore_upload_info_release.json + apps/mobile-app/ios/ios_appstore_upload_info_release.json - name: Upload Archive uses: actions/upload-artifact@v3 with: name: ios-archive-release path: | - App/ios/*.xcarchive - App/ios/*.xcarchive.zip - App/*.xcarchive - App/*.xcarchive.zip + apps/mobile-app/ios/*.xcarchive + apps/mobile-app/ios/*.xcarchive.zip + apps/mobile-app/*.xcarchive + apps/mobile-app/*.xcarchive.zip publish: runs-on: ubuntu-latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 047506ef..8a2f21b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,285 +1,283 @@ -name: CI +name: CI (Old) run-name: "CI${{ vars.CI_ENABLE_BUILD && ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (!github.event.pull_request.draft && github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.clone_url == github.event.pull_request.base.repo.clone_url)) && ' & Build:' || ':' }} ${{ github.event_name == 'push' && format('[{0}] {1}', github.ref_name, github.event.head_commit.message) || github.event_name == 'pull_request' && format('PR #{0}: {1}', github.event.pull_request.number, github.event.pull_request.title) || github.event_name == 'release' && format('{0}', github.event.release.name) || github.event_name == 'release' && format('{0}', github.event.release.name) || github.event_name == 'schedule' && format('Scheduled: {0}', github.ref_name) || github.ref_name }}" on: push: branches: - # - main - - __ignore__ # Temporary disable this workflow + - main paths-ignore: - '**/README.md' - # pull_request: - # types: [opened, synchronize, reopened, ready_for_review] - # branches: - # - main - # paths-ignore: - # - '**/README.md' - # release: - # types: [published] - # schedule: - # # Every Monday - # - cron: 0 0 * * 1 - # # # First Sunday of every month - # # # See: https://crontab.guru/#0_0_1-7_*_*/7 - # # - cron: '0 0 1-7 * */7' # https://stackoverflow.com/a/73826599 + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + branches: + - main + paths-ignore: + - '**/README.md' + release: + types: [published] + schedule: + # Every Monday + - cron: 0 0 * * 1 + # # First Sunday of every month + # # See: https://crontab.guru/#0_0_1-7_*_*/7 + # - cron: '0 0 1-7 * */7' # https://stackoverflow.com/a/73826599 concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: - test-data: - name: "Test: Data" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.15.0 - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: data-node_modules - with: - path: Data/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Data/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn Install - run: | - cd Data - yarn install - - name: Typecheck - run: | - cd Data - yarn run typecheck - - name: Test - run: | - cd Data - FORCE_COLOR=true yarn test --verbose + # test-data: + # name: "Test: Data" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 18.15.0 + # - name: Cache node_modules + # uses: actions/cache@v3 + # env: + # cache-name: data-node_modules + # with: + # path: Data/node_modules + # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('Data/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-${{ env.cache-name }}- + # - name: Yarn Install + # run: | + # cd Data + # yarn install + # - name: Typecheck + # run: | + # cd Data + # yarn run typecheck + # - name: Test + # run: | + # cd Data + # FORCE_COLOR=true yarn test --verbose - test-app: - name: "Test: App" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.15.0 - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: app-node_modules - with: - path: App/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn Install - run: | - cd App - yarn install - - name: Typecheck - run: | - cd App - yarn run typecheck - - name: Test - run: | - cd App - FORCE_COLOR=true yarn test --verbose + # test-app: + # name: "Test: App" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 18.15.0 + # - name: Cache node_modules + # uses: actions/cache@v3 + # env: + # cache-name: app-node_modules + # with: + # path: App/node_modules + # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-${{ env.cache-name }}- + # - name: Yarn Install + # run: | + # cd App + # yarn install + # - name: Typecheck + # run: | + # cd App + # yarn run typecheck + # - name: Test + # run: | + # cd App + # FORCE_COLOR=true yarn test --verbose - test-epc-utils: - name: "Test: epc-utils" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.15.0 - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: epc-utils-node_modules - with: - path: packages/epc-utils/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/epc-utils/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn Install - run: | - cd packages/epc-utils - yarn install - - name: Typecheck - run: | - cd packages/epc-utils - yarn run typecheck - - name: Test - run: | - cd packages/epc-utils - FORCE_COLOR=true yarn test --verbose + # test-epc-utils: + # name: "Test: epc-utils" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 18.15.0 + # - name: Cache node_modules + # uses: actions/cache@v3 + # env: + # cache-name: epc-utils-node_modules + # with: + # path: packages/epc-utils/node_modules + # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/epc-utils/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-${{ env.cache-name }}- + # - name: Yarn Install + # run: | + # cd packages/epc-utils + # yarn install + # - name: Typecheck + # run: | + # cd packages/epc-utils + # yarn run typecheck + # - name: Test + # run: | + # cd packages/epc-utils + # FORCE_COLOR=true yarn test --verbose - test-data-storage-couchdb: - name: "Test: data-storage-couchdb" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.15.0 - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: data-storage-couchdb-node_modules - with: - path: packages/data-storage-couchdb/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/data-storage-couchdb/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn Install - run: | - cd packages/data-storage-couchdb - yarn install - - name: Typecheck - run: | - cd packages/data-storage-couchdb - yarn run typecheck - - name: Test - run: | - cd packages/data-storage-couchdb - FORCE_COLOR=true yarn test --verbose + # test-data-storage-couchdb: + # name: "Test: data-storage-couchdb" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 18.15.0 + # - name: Cache node_modules + # uses: actions/cache@v3 + # env: + # cache-name: data-storage-couchdb-node_modules + # with: + # path: packages/data-storage-couchdb/node_modules + # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/data-storage-couchdb/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-${{ env.cache-name }}- + # - name: Yarn Install + # run: | + # cd packages/data-storage-couchdb + # yarn install + # - name: Typecheck + # run: | + # cd packages/data-storage-couchdb + # yarn run typecheck + # - name: Test + # run: | + # cd packages/data-storage-couchdb + # FORCE_COLOR=true yarn test --verbose - test-data-storage-couchdb-remote: - name: "Test: data-storage-couchdb w/CouchDB" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.15.0 - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: data-storage-couchdb-node_modules - with: - path: packages/data-storage-couchdb/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/data-storage-couchdb/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Setup CouchDB - uses: zetavg/couchdb-action@master - - name: Create CouchDB Database - run: | - curl -X PUT http://user:password@localhost:5984/test - - name: Yarn Install - run: | - cd packages/data-storage-couchdb - yarn install - - name: Test - run: | - cd packages/data-storage-couchdb - COUCHDB_URI='http://127.0.0.1:5984/test' COUCHDB_USERNAME=user COUCHDB_PASSWORD=password yarn test lib/__tests__/data-storage-couchdb.test.ts --runInBand + # test-data-storage-couchdb-remote: + # name: "Test: data-storage-couchdb w/CouchDB" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 18.15.0 + # - name: Cache node_modules + # uses: actions/cache@v3 + # env: + # cache-name: data-storage-couchdb-node_modules + # with: + # path: packages/data-storage-couchdb/node_modules + # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/data-storage-couchdb/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-${{ env.cache-name }}- + # - name: Setup CouchDB + # uses: zetavg/couchdb-action@master + # - name: Create CouchDB Database + # run: | + # curl -X PUT http://user:password@localhost:5984/test + # - name: Yarn Install + # run: | + # cd packages/data-storage-couchdb + # yarn install + # - name: Test + # run: | + # cd packages/data-storage-couchdb + # COUCHDB_URI='http://127.0.0.1:5984/test' COUCHDB_USERNAME=user COUCHDB_PASSWORD=password yarn test lib/__tests__/data-storage-couchdb.test.ts --runInBand - test-integration-airtable: - name: "Test: integration-airtable" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.15.0 - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: integration-airtable-node_modules - with: - path: packages/integration-airtable/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/integration-airtable/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn Install - run: | - cd packages/integration-airtable - yarn install - - name: Typecheck - run: | - cd packages/integration-airtable - yarn run typecheck - - name: Test - run: | - cd packages/integration-airtable - FORCE_COLOR=true yarn test --verbose + # test-integration-airtable: + # name: "Test: integration-airtable" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 18.15.0 + # - name: Cache node_modules + # uses: actions/cache@v3 + # env: + # cache-name: integration-airtable-node_modules + # with: + # path: packages/integration-airtable/node_modules + # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/integration-airtable/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-${{ env.cache-name }}- + # - name: Yarn Install + # run: | + # cd packages/integration-airtable + # yarn install + # - name: Typecheck + # run: | + # cd packages/integration-airtable + # yarn run typecheck + # - name: Test + # run: | + # cd packages/integration-airtable + # FORCE_COLOR=true yarn test --verbose - test-integration-snipe-it: - name: "Test: integration-snipe-it" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18.15.0 - - name: Cache node_modules - uses: actions/cache@v3 - env: - cache-name: integration-snipe-it-node_modules - with: - path: packages/integration-snipe-it/node_modules - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/integration-snipe-it/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - - name: Yarn Install - run: | - cd packages/integration-snipe-it - yarn install - - name: Typecheck - run: | - cd packages/integration-snipe-it - yarn run typecheck - - name: Test - run: | - cd packages/integration-snipe-it - FORCE_COLOR=true yarn test --verbose + # test-integration-snipe-it: + # name: "Test: integration-snipe-it" + # runs-on: ubuntu-latest + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: 18.15.0 + # - name: Cache node_modules + # uses: actions/cache@v3 + # env: + # cache-name: integration-snipe-it-node_modules + # with: + # path: packages/integration-snipe-it/node_modules + # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('packages/integration-snipe-it/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-${{ env.cache-name }}- + # - name: Yarn Install + # run: | + # cd packages/integration-snipe-it + # yarn install + # - name: Typecheck + # run: | + # cd packages/integration-snipe-it + # yarn run typecheck + # - name: Test + # run: | + # cd packages/integration-snipe-it + # FORCE_COLOR=true yarn test --verbose - paths-filter: - runs-on: ubuntu-latest - outputs: - app: ${{ steps.filter.outputs.app }} - steps: - - uses: actions/checkout@v2 - - uses: dorny/paths-filter@v2 - id: filter - with: - filters: | - app: - - 'App/**' - data: - - 'Data/**' - data-storage-couchdb: - - 'packages/data-storage-couchdb/**' - epc-utils: - - 'packages/epc-utils/**' - integration-airtable: - - 'packages/integration-airtable/**' + # paths-filter: + # runs-on: ubuntu-latest + # outputs: + # app: ${{ steps.filter.outputs.app }} + # steps: + # - uses: actions/checkout@v2 + # - uses: dorny/paths-filter@v2 + # id: filter + # with: + # filters: | + # app: + # - 'App/**' + # data: + # - 'Data/**' + # data-storage-couchdb: + # - 'packages/data-storage-couchdb/**' + # epc-utils: + # - 'packages/epc-utils/**' + # integration-airtable: + # - 'packages/integration-airtable/**' build: name: "Build App" - needs: - - test-app - - paths-filter + # needs: + # - paths-filter # Build if the app has changes, and event is not a pull request, or if the pull request is not a draft and the pull request is not from a fork (runs of fork PRs will not have access to secrets that are required for building the app). - if: ${{ vars.CI_ENABLE_BUILD && (github.event_name == 'release' || github.event_name == 'schedule' || needs.paths-filter.outputs.app == 'true' || needs.paths-filter.outputs.data == 'true' || needs.paths-filter.outputs.data-storage-couchdb == 'true' || needs.paths-filter.outputs.epc-utils == 'true' || needs.paths-filter.outputs.integration-airtable == 'true') && ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (!github.event.pull_request.draft && github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.clone_url == github.event.pull_request.base.repo.clone_url)) }} + if: ${{ vars.CI_ENABLE_BUILD && (github.event_name == 'release' || github.event_name == 'schedule' || true) && ((github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || (!github.event.pull_request.draft && github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.clone_url == github.event.pull_request.base.repo.clone_url)) }} uses: ./.github/workflows/build_app.yml with: build-release: ${{ github.event_name == 'release' }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint-old.yml similarity index 99% rename from .github/workflows/lint.yml rename to .github/workflows/lint-old.yml index 0399a5ce..a9b6019a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint-old.yml @@ -1,4 +1,4 @@ -name: Lint +name: Lint (Old) run-name: "Lint: ${{ github.event_name == 'push' && format('[{0}] {1}', github.ref_name, github.event.head_commit.message) || github.event_name == 'pull_request' && format('PR #{0}: {1}', github.event.pull_request.number, github.event.pull_request.title) || github.ref_name }}" on: push: