From e9dfe58def78573cc0ea8b9467034566806418af Mon Sep 17 00:00:00 2001 From: vpf26432 Date: Fri, 21 Apr 2023 08:26:32 +0000 Subject: [PATCH] first attempt at an actions workflow to do the integration testing. --- .github/workflows/integration-testing.yml | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/integration-testing.yml diff --git a/.github/workflows/integration-testing.yml b/.github/workflows/integration-testing.yml new file mode 100644 index 0000000..d2b1671 --- /dev/null +++ b/.github/workflows/integration-testing.yml @@ -0,0 +1,62 @@ +name: Integration tests V4 + +on: + pull_request: + +jobs: + container_job: + runs_on: ubuntu-latest + + services: + mongo: + image: scimongo + ports: 27107:27107 + scicat-backend: + image: ghcr/scicat-project/backend-next + ports: 3000:3000 + environmentVariables: + MONGODB_URI: mongodb://mongo:27017/scicat + EXPRESS_SESSION_SECRET: "${EXPRESS_SESSION_SECRET}" + JWT_SECRET: "${JWT_SECRET}" + PORT: 3000 + HTTP_MAX_REDIRECTS: 5 + HTTP_TIMEOUT: 5000 + JWT_EXPIRES_IN: 3600 + SITE: SAMPLE-SITE + PID_PREFIX: PID.SAMPLE.PREFIX + DOI_PREFIX: DOI.SAMPLE.PREFIX + METADATA_KEYS_RETURN_LIMIT: 100 + METADATA_PARENT_INSTANCES_RETURN_LIMIT: 100 + ADMIN_GROUPS: admin,ingestor + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install + shell: bash -l {0} + run: source continuous_integration/scripts/install.sh + + - name: Install test requirements + shell: bash -l {0} + run: | + set -vxeuo pipefail + python -m pip install -r requirements-dev.txt + python -m pip list + + - name: Lint with flake8 + shell: bash -l {0} + run: | + set -vxeuo pipefail + python -m flake8 + + - name: Test with pytest + shell: bash -l {0} + run: | + set -vxeuo pipefail + coverage run -m pytest -k tests_integration -v + coverage report \ No newline at end of file