diff --git a/.github/workflows/build_and_publish.yaml b/.github/workflows/build_and_publish.yaml index 762feb88..e3bbde6b 100644 --- a/.github/workflows/build_and_publish.yaml +++ b/.github/workflows/build_and_publish.yaml @@ -18,7 +18,7 @@ permissions: jobs: tag-new-version: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: tag: ${{ steps.tag.outputs.new_tag }} version: ${{ steps.tag.outputs.new_version }} @@ -51,13 +51,15 @@ jobs: just docker/build prod # explicitly build prod as well - name: Test image run: just docker/test + - name: Functional teste + run: just docker/functional-test - name: Log into GitHub Container Registry run: docker login https://ghcr.io -u ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} - name: Push image to GitHub Container Registry run: | - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME - docker tag $IMAGE_NAME $IMAGE_ID:latest - docker push $IMAGE_ID:latest + IMAGE_ID="ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME" + docker tag "$IMAGE_NAME" "$IMAGE_ID:latest" + docker push "$IMAGE_ID:latest" create-release-from-tag: name: Create release from tag diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index deb0309c..7eb5959c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ env: jobs: check: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -26,13 +26,15 @@ jobs: test-job: strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12] + os: [ubuntu-22.04, windows-2019, macos-12] # Python 3.8 is what we currently support for running cohortextractor # locally, and 3.9 is what we required for databuilder so we need to make # sure we can run with those python: ["3.8", "3.9", "3.10"] runs-on: ${{ matrix.os }} name: Run test suite + env: + PYTHON_VERSION: ${{ matrix.python }} steps: - name: Checkout uses: actions/checkout@v4 @@ -65,7 +67,7 @@ jobs: - uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d - name: Run actual tests on ${{ matrix.os }} - if: ${{ matrix.os == 'ubuntu-20.04' }} + if: ${{ matrix.os == 'ubuntu-22.04' }} run: just test -vvv - name: Run actual tests on ${{ matrix.os }} @@ -73,7 +75,7 @@ jobs: run: just test-no-docker -vvv test-package-build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Test we can build PyPI package steps: - name: Checkout @@ -100,7 +102,7 @@ jobs: run: just package-test sdist test-docker: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Test docker image steps: - name: Checkout @@ -117,8 +119,11 @@ jobs: - name: Run tests in docker-image run: just docker/test + - name: Run functional test + run: just docker/functional-test + test-github-workflow-output: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 name: Inspect test runner output in the context of a Github Workflow steps: - name: Checkout