Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Run functional tests #89

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Run functional tests #89

merged 1 commit into from
Dec 28, 2022

Conversation

mikelik
Copy link
Contributor

@mikelik mikelik commented Dec 16, 2022

Build DUNE docker image and run functional test against it.
Marked 2 tests as ignored as the tests are failing. Separate issues were created for them:

  1. --bootstrap-system-full doesn't work correctly. #80
  2. Add a test for DUNE --get-table key to the functional tests #81

@mikelik mikelik force-pushed the mikelik/run-test branch 5 times, most recently from 985376a to 818e4e5 Compare December 19, 2022 11:00
@mikelik mikelik self-assigned this Dec 19, 2022
@mikelik mikelik linked an issue Dec 19, 2022 that may be closed by this pull request
@mikelik mikelik marked this pull request as ready for review December 19, 2022 11:33
runs-on: ubuntu-latest
steps:
- name: Use Docker in rootless mode (To solve "Permission denied" error when removing test_app directory)
uses: ScribeMD/rootless-docker@0.2.2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More explanation can be found here: https://github.com/marketplace/actions/rootless-docker
In short: all docker commands (i.e. creating contracts using DUNE) are executed as root, which causes access issues. Particulary test_app directory is owned by root, not by user runner which executes the tests.

run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is obsolete, but doesn't do any harm. In the future we might simply add requirements.txt file with all python dependencies and the tests would pass without any changes in run-tests.yml.

uses: docker/setup-buildx-action@v2
- shell: bash
run: |
./bootstrap.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently we built DUNE docker image from scratch (which tests bootstrap.sh and Dockerfile).
I prefer building from scratch than just downloading latest DUNE image from packages (because Dockerfile and bootstrap.sh might change in the meanwhile).

Copy link
Contributor

@ScottBailey ScottBailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ScottBailey ScottBailey requested a review from kj4ezj December 20, 2022 15:02
@mikelik mikelik merged commit 9fd9401 into main Dec 28, 2022
@mikelik mikelik deleted the mikelik/run-test branch December 28, 2022 10:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functional tests should be executed on every merge / PR created
3 participants