mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
15726cc8ac
![Outdated as of 2020](https://github.com/Unleash/unleash/assets/177402/689a1bcc-441d-4b87-88a6-125e68a17f26) This has been on our TODO list for a long time. We're moving to latest released at the time of commit (v4.2.2)
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Test db migrations
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'src/migrations/**'
|
|
- '.github/workflows/validate-migrations.yaml'
|
|
- 'test-migrations/**'
|
|
- 'frontend/cypress'
|
|
workflow_dispatch:
|
|
jobs:
|
|
test-migrations:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js 20.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20.x
|
|
cache: 'yarn'
|
|
- name: Start database
|
|
working-directory: test-migrations
|
|
run: docker compose up db -d --wait -t 90
|
|
- name: Start stable version of Unleash
|
|
working-directory: test-migrations
|
|
run: docker compose up unleash -d --wait -t 90
|
|
# add some data with terraform
|
|
- name: Apply migrations
|
|
env:
|
|
DATABASE_URL: postgres://postgres:unleash@localhost:5432/unleash
|
|
DATABASE_SSL: false
|
|
YARN_ENABLE_SCRIPTS: false
|
|
run: |
|
|
yarn install --immutable
|
|
yarn db-migrate up
|
|
# run ui tests against previous version of Unleash
|
|
- name: Run Cypress
|
|
uses: cypress-io/github-action@v6
|
|
with:
|
|
working-directory: frontend
|
|
env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
|
|
config: baseUrl=http://localhost:4242
|
|
spec: cypress/oss/**/*.spec.ts
|
|
install-command: yarn --immutable
|