Playground check #24
Workflow file for this run
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: Playground operation check | |
on: | |
pull_request: | |
schedule: | |
# Run this job once per day | |
- cron: "0 0 * * *" | |
jobs: | |
playground-check: | |
runs-on: ubuntu-latest | |
env: | |
FORK_URL_MAINNET: ${{ secrets.FORK_URL_MAINNET }} | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: false | |
docker-images: false | |
swap-storage: false | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependency | |
run: sudo apt-get -qq update && sudo apt-get -y -q install curl jq | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Setup environment | |
run: | | |
cp playground/.env.example playground/.env | |
sed -i -e 's/ETH_RPC_URL=.*/ETH_RPC_URL=$FORK_URL_MAINNET/g' playground/.env | |
cat playground/.env | |
- name: Start docker containers | |
run: | | |
cd playground | |
# firstly start explorer container to workaround yarn cache problem | |
docker compose -f docker-compose.fork.yml up -d explorer | |
docker compose -f docker-compose.fork.yml up -d | |
- name: Execute validation script | |
run: | | |
cd playground | |
./test_playground.sh | |
- name: Collect docker logs on failure | |
if: failure() | |
uses: jwalton/gh-docker-logs@v2 | |
with: | |
dest: './logs' | |
- name: Tar logs | |
if: failure() | |
run: tar cvzf ./logs.tgz ./logs | |
- name: Upload logs to GitHub | |
if: failure() | |
uses: actions/upload-artifact@master | |
with: | |
name: logs.tgz | |
path: ./logs.tgz | |
- name: Slack notification on failure | |
if: failure() | |
id: slack | |
uses: slackapi/slack-github-action@v1.27.0 | |
with: | |
payload: | | |
{"job_link":"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PLAYGROUND_CI_WEBHOOK_URL }} |