Skip to content

Commit

Permalink
Add functional test to github workflows
Browse files Browse the repository at this point in the history
Also, update default os to 22.04
  • Loading branch information
bloodearnest committed Sep 27, 2024
1 parent 5eebfcf commit b560c8f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_and_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
check:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -65,15 +65,15 @@ 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 }}
if: ${{ matrix.os == 'windows-2019' || matrix.os == 'macos-12' }}
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
Expand All @@ -100,7 +100,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
Expand All @@ -117,8 +117,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
Expand Down

0 comments on commit b560c8f

Please sign in to comment.