FIX: A reference should not be created from a document to itself. #767
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: Acceptance tests | |
on: | |
push: | |
branches-ignore: | |
- main | |
workflow_call: | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Greenframe needs the whole history | |
- name: Download tools | |
run: | | |
docker compose --file docker-compose.test.yml pull | |
docker pull benel/cucumber-capybara | |
curl https://assets.greenframe.io/install.sh | bash | |
- name: Install and launch backend with test data | |
run: | | |
export COUCHDB_USER="TO_BE_CHANGED" | |
export COUCHDB_PASSWORD="TO_BE_CHANGED" | |
docker compose --file docker-compose.test.yml up --detach sample_users updated_samples updated_code | |
- name: Wait for frontend build | |
uses: lewagon/wait-on-check-action@v1.3.1 | |
with: | |
check-regexp: .? / build | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get frontend build | |
uses: actions/download-artifact@v4 | |
with: | |
name: frontend-build | |
path: frontend/build | |
- name: Start frontend | |
run: | | |
export COUCHDB_USER="TO_BE_CHANGED" | |
export COUCHDB_PASSWORD="TO_BE_CHANGED" | |
docker compose --file docker-compose.test.yml up --detach | |
- name: Wait for frontend | |
uses: docker://benel/wait-for-response:1 | |
with: | |
args: http://localhost/ 200 30000 500 | |
- name: Run tests | |
run: | |
docker run --rm -v "$(pwd)":/app --tty --net="host" --env APP_HOST="http://`hostname`" benel/cucumber-capybara --retry 2 --fail-fast --no-source --no-snippets | |
shell: 'script -q -e -c "bash {0}"' | |
- name: Measure carbon footprint | |
run: | | |
cd requirements | |
greenframe analyze >> $GITHUB_STEP_SUMMARY | |
env: | |
GREENFRAME_SECRET_TOKEN: ${{secrets.GREENFRAME_SECRET_TOKEN}} | |