diff --git a/.github/workflows/e2e-macos.yml b/.github/workflows/e2e-macos.yml index baf69005532..92c1e2da2c2 100644 --- a/.github/workflows/e2e-macos.yml +++ b/.github/workflows/e2e-macos.yml @@ -24,6 +24,12 @@ jobs: test: runs-on: macos-latest + env: + TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }} + BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }} + BRANCH: ${{ github.event.inputs.branch || '' }} + TAGS: ${{ github.event.inputs.tags || 'all' }} + steps: - uses: actions/checkout@v3 @@ -39,48 +45,46 @@ jobs: - name: Prepare MacOS run: brew install screen - - name: ๐Ÿ•’ Get Date/Time - id: date-time - shell: bash - run: | - echo "value=$(rake datetime)" >> $GITHUB_OUTPUT - - name: ๐Ÿ’พ GH Cache node db - id: cache + id: cache-node uses: actions/cache@v3 with: - path: test/e2e/state/node_db/${{ env.NETWORK }} - key: node-db-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }} - restore-keys: | - node-db-${{ runner.os }}-${{ env.NETWORK }}- - node-db-Linux-${{ env.NETWORK }}- + path: test/e2e/state/node_db/preprod + key: node-db-${{ runner.os }}-preprod - name: ๐Ÿ’พ Cache wallet db id: cache-wallet uses: actions/cache@v3 with: - path: test/e2e/state/wallet_db/${{ env.NETWORK }} - key: wallet-db3-${{ runner.os }}-${{ env.NETWORK }}-${{ steps.date-time.outputs.value }} - restore-keys: | - wallet-db3-${{ runner.os }}-${{ env.NETWORK }}- + path: test/e2e/state/wallet_db/preprod + key: wallet-db3-${{ runner.os }}-preprod + + - name: Fetch preprod snapshot + if: steps.cache-node.outputs.cache-hit != 'true' + run: | + mkdir -p state/node_db/preprod + curl -o - https://downloads.csnapshots.io/snapshots/testnet/$(curl -s https://downloads.csnapshots.io/snapshots/testnet/testnet-db-snapshot.json | jq -r .[].file_name ) \ + | lz4 -c -d - | tar -x -C state/node_db/preprod + mv state/node_db/preprod/db/* state/node_db/preprod + rmdir state/node_db/preprod/db - name: โš™๏ธ Setup (get latest bins and configs and decode fixtures) - run: rake setup[$NETWORK,$BRANCH] + run: rake setup[preprod,$BRANCH] - name: ๐Ÿ” Display versions run: rake display_versions - name: ๐Ÿš€ Start node and wallet - run: rake start_node_and_wallet[$NETWORK] + run: rake start_node_and_wallet[preprod] - name: โณ Wait until node is synced run: rake wait_until_node_synced - - name: ๐Ÿงช Run all tests - run: rake spec SPEC_OPTS="-t $TAGS" + # - name: ๐Ÿงช Run all tests + # run: rake spec SPEC_OPTS="-t $TAGS" - name: ๐Ÿ Stop node and wallet - run: rake stop_node_and_wallet[$NETWORK] + run: rake stop_node_and_wallet[preprod] - name: ๐Ÿ“Ž Upload state uses: actions/upload-artifact@v3 @@ -91,11 +95,3 @@ jobs: test/e2e/state/logs test/e2e/state/configs test/e2e/state/wallet_db - - env: - TESTS_E2E_FIXTURES: ${{ secrets.TESTS_E2E_FIXTURES }} - BUILDKITE_API_TOKEN: ${{ secrets.BUILDKITE_TOKEN_READ_BUILDS_ARTIFACTS }} - NETWORK: ${{ github.event.inputs.network || 'preprod' }} - BRANCH: ${{ github.event.inputs.branch || '' }} - NODE_DB_CACHE: ${{ github.event.inputs.node_db_cache || 'GH' }} - TAGS: ${{ github.event.inputs.tags || 'all' }}