Skip to content

Update survey json for image from UploadCare #421

Update survey json for image from UploadCare

Update survey json for image from UploadCare #421

Workflow file for this run

name: Test
on:
pull_request:
push:
branches:
- develop
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_USERNAME: ${{ github.repository_owner }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
COMPOSE_FILE: docker-compose.test.yml
DOCKER_IMAGE: ${{ github.repository }}
jobs:
build:
name: Build docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set BRANCH_TAG
uses: nimblehq/branch-tag-action@v1
- name: Log in to Docker registry
run: echo "$DOCKER_TOKEN" | docker login $DOCKER_REGISTRY --username=$DOCKER_USERNAME --password-stdin
- name: Pull Docker image
if: env.BRANCH_TAG != 'latest' && env.BRANCH_TAG != 'develop'
run: docker-compose pull test || true
- name: Build Docker image
run: |
bin/docker-prepare
docker-compose build
docker-compose push test
unit_test:
name: Run unit test
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set BRANCH_TAG
uses: nimblehq/branch-tag-action@v1
- name: Log in to Docker registry
run: echo "$DOCKER_TOKEN" | docker login $DOCKER_REGISTRY --username=$DOCKER_USERNAME --password-stdin
- name: Pull Docker image
run: docker-compose pull
- name: Run linters
run: docker-compose run test yarn lint
- name: Run rspec
run: docker-compose run test bundle exec rspec --exclude-pattern "spec/systems/**/*_spec.rb" --profile
system_test:
name: Run system test
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set BRANCH_TAG
uses: nimblehq/branch-tag-action@v1
- name: Log in to Docker registry
run: echo "$DOCKER_TOKEN" | docker login $DOCKER_REGISTRY --username=$DOCKER_USERNAME --password-stdin
- name: Pull Docker image
run: docker-compose pull
- name: Run rspec
run: docker-compose run test bundle exec rspec spec/systems --profile