Add consented to studies, dont include non-consented points #1601
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: Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
playwright: | |
timeout-minutes: 60 | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bahmutov/npm-install@v1 | |
with: | |
working-directory: frontend | |
- name: Build docker image | |
run: ./frontend/docker/build | |
- name: Build and run backend docker | |
run: | | |
docker-compose run api bundle exec rake db:migrate | |
docker-compose up -d | |
- name: log docker status | |
run: | | |
sleep 30 | |
docker ps -a | |
docker logs kinetic_api_1 | |
curl -i http://localhost:4006/api/v1/openapi.json | |
docker logs kinetic_api_1 | |
- name: Wait for api to boot | |
working-directory: frontend | |
run: yarn run wait-on http://localhost:4006/api/v1/openapi.json | |
- name: Generate bindings | |
run: docker compose exec api bundle exec rake openstax_openapi:generate_model_bindings[1] | |
- name: Check for changes in bindings | |
uses: tj-actions/verify-changed-files@v13 | |
id: verify-changed-files | |
with: | |
files: | | |
frontend/src/api | |
- name: Fail if bindings changed | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
echo "Changed files: ${{ steps.verify_changed_files.outputs.changed_files }}" | |
exit 1 | |
- name: Run specs | |
working-directory: frontend | |
run: | | |
yarn | |
npx playwright install chromium --with-deps | |
npx playwright test | |
- name: Save test-results of failures | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: test-results | |
path: ./frontend/test-results | |
- name: Shutdown docker compose | |
if: always() | |
run: docker-compose down | |
rspec: | |
timeout-minutes: 10 | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Build docker image and run specs within it | |
run: | | |
CI_ENV=`bash <(curl -s https://codecov.io/env)` | |
API_DOCKERFILE_EXT=.ci docker-compose build | |
docker-compose run -T -e CI_ENV="$CI_ENV" -e ENABLE_CODECOV=1 -e CI=true api /bin/bash -c "bundle config path vendor/bundle; bundle install; bundle exec rspec" | |
- name: Stop containers | |
if: always() | |
run: docker-compose down |