Skip to content

Bump follow-redirects from 1.15.2 to 1.15.4 in /dashboard #329

Bump follow-redirects from 1.15.2 to 1.15.4 in /dashboard

Bump follow-redirects from 1.15.2 to 1.15.4 in /dashboard #329

# This is a basic workflow to help you get started with Actions
name: Dashboard Tests
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
workflow_dispatch:
inputs:
engine-branch:
description: 'Optional branch to checkout for iasql/iasql'
push:
branches: [main]
paths: ['dashboard/**', '.github/workflows/tests-dashboard.yml', Dockerfile]
pull_request:
branches: [main]
paths: ['dashboard/**', '.github/workflows/tests-dashboard.yml', Dockerfile]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: |
cd dashboard
yarn
cd ..
- name: Run linter check
run: |
cd dashboard
yarn lint
cd ..
style:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: |
cd dashboard
yarn
cd ..
- name: Run code style check
run: |
cd dashboard
yarn style
cd ..
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: |
cd dashboard
yarn
cd ..
- name: Build dashboard
run: |
cd dashboard
yarn build
cd ..
test:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Start local iasql container
run: |
docker build -t iasql:latest .
docker run -p 9876:9876 -p 5432:5432 -e IASQL_ENV=ci --name iasql iasql:latest &
while ! psql postgres://postgres:test@localhost:5432/iasql_metadata -b -q -c "SELECT iasql_engine_health()"; do sleep 1 && echo -n .; done;
- name: Install Playwright
run: |
cd dashboard
yarn --frozen-lockfile
npx playwright install --with-deps
npx playwright --version
cd ..
- name: Run Playwright tests
run: |
cd dashboard
yarn test
cd ..
env:
TEST_ACCOUNT_EMAIL: dev+dashboard-testing@iasql.com
TEST_ACCOUNT_PASSWORD: ${{ secrets.TEST_ACCOUNT_PASSWORD }}
AWS_REGION: us-east-2
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_SECRET_ACCESS_KEY }}
IASQL_ENV: test
WEBSITE_URL: http://localhost:9876/
# https://github.com/actions/upload-artifact#where-does-the-upload-go
# Download artifact and upload to https://trace.playwright.dev
- uses: actions/upload-artifact@v2
if: always()
with:
name: test-results
path: dashboard/test-results/
retention-days: 3
- name: Local engine logs
if: always()
run: docker logs $(docker ps -a --filter "name=iasql" --format "{{.Names}}")