E2E Linux #1192
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Linux | |
on: | |
schedule: | |
- cron: "0 20 * * *" | |
workflow_dispatch: | |
inputs: | |
network: | |
description: 'Network' | |
required: true | |
default: 'preprod' | |
branch: | |
description: 'Run tests against branch' | |
default: 'master' | |
tags: | |
description: 'Test tags (all, light, offchain...)' | |
default: 'all' | |
defaults: | |
run: | |
working-directory: ./test/e2e | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: 3.1.2 | |
bundler-cache: true | |
- name: Install dependencies | |
run: bundle install | |
- name: 🕒 Get Date/Time | |
id: date-time | |
shell: bash | |
run: | | |
echo "value=$(rake datetime)" >> $GITHUB_OUTPUT | |
- name: 💾 GH Cache node db | |
id: cache | |
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 }}- | |
- 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 }}- | |
- name: ⚙️ Setup (get latest bins and configs and decode fixtures) | |
run: rake setup[$NETWORK,$BRANCH] | |
- name: 🔍 Display versions | |
run: rake display_versions | |
- name: 🚀 Start node and wallet | |
run: rake start_node_and_wallet[$NETWORK] | |
- name: ⏳ Wait until node is synced | |
run: rake wait_until_node_synced | |
- name: 🧪 Run all tests | |
run: rake spec SPEC_OPTS="-t $TAGS" | |
- name: 🏁 Stop node and wallet | |
run: rake stop_node_and_wallet[$NETWORK] | |
- name: 📎 Upload state | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: ${{ runner.os }}-state | |
path: | | |
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' }} |