Update README.md (#362) #217
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
--- | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
name: Tests for testnet | |
jobs: | |
prebuild: | |
name: Prebuild | |
runs-on: [self-hosted, heavy] | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'safe to test') || github.ref == 'refs/heads/master' }} | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- name: Install upx | |
run: apt-get install -y upx | |
- name: Prebuild | |
run: ./.ci/e2e/runner/prebuild.sh | |
env: | |
TEST_NET_KEY: ${{ secrets.TEST_NET_KEY }} | |
- name: Teardown | |
if: ${{ always() }} | |
run: ./.ci/e2e/runner/teardown.sh | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Jest specs | |
run: | | |
npm test | |
name: ${{ matrix.name }} | |
runs-on: [self-hosted, heavy] | |
needs: prebuild | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- name: Setup | |
run: ./.ci/e2e/runner/setup.sh | |
env: | |
TEST_NET_KEY: ${{ secrets.TEST_NET_KEY }} | |
- name: Cache node modules | |
id: cache-dep | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install JS dependencies | |
if: steps.cache-dep.outputs.cache-hit != 'true' | |
run: npm install | |
- name: Build app | |
run: npm run build | |
- name: Run Test | |
run: ${{ matrix.run }} | |
- name: Print database logs | |
if: ${{ always() }} | |
run: ./.ci/e2e/show_logs.sh database | |
- name: Print indexer logs | |
if: ${{ always() }} | |
run: ./.ci/e2e/show_logs.sh indexer | |
- name: Print endpoint logs | |
if: ${{ always() }} | |
run: ./.ci/e2e/show_logs.sh endpoint | |
- name: Teardown | |
if: ${{ always() }} | |
run: ./.ci/e2e/runner/teardown.sh | |
cleanup: | |
name: Cleanup | |
runs-on: [self-hosted, heavy] | |
needs: tests | |
if: ${{ always() }} | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- name: Cleanup | |
run: ./.ci/e2e/runner/cleanup.sh |