Refactor module name and imports to new repository location #1
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: K6 Load Test | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
k6-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install k6 | |
uses: grafana/setup-k6-action@v1 | |
- name: up db | |
run: make up-db-raw | |
- name: Compile cartesi-rollups-graphql | |
run: go build . | |
- name: Install PostgreSQL Client | |
run: sudo apt-get install -y postgresql-client | |
- name: Wait for Postgres to be ready | |
run: | | |
echo "Waiting for postgres to be ready..." | |
for i in {1..30}; do | |
if pg_isready -h localhost -p 5432 -U myuser; then | |
echo "Postgres is ready" | |
break | |
else | |
echo "Postgres is unavailable - sleeping" | |
sleep 1 | |
fi | |
done | |
- name: Creating database rlgraphql | |
run: psql "postgres://postgres:password@localhost:5432/rollupsdb?sslmode=disable" -c "CREATE DATABASE rlgraphql WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';" | |
- name: Using Postgres DB | |
run: | | |
export POSTGRES_GRAPHQL_DB_URL="postgres://postgres:password@localhost:5432/rlgraphql?sslmode=disable" | |
export POSTGRES_NODE_DB_URL="postgres://postgres:password@localhost:5432/rollupsdb?sslmode=disable" | |
nohup ./cartesi-rollups-graphql -d --raw-enabled --db-implementation=postgres & | |
- name: Run k6 tests | |
id: k6 | |
uses: grafana/run-k6-action@v1 | |
with: | |
debug: true | |
path: | | |
./loadtesting/test.js |