Skip to content

Commit

Permalink
feat(IPVC-2299): Run tests in a github action (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
nvta1209 authored Apr 2, 2024
1 parent c5c1918 commit 9249911
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
types:
- checks_requested

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build image
run: docker build --target uta-test -t uta-test .
- name: Run tests
run: docker run --rm uta-test python -m unittest
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ FROM uta as uta-test
RUN DEBIAN_FRONTEND=noninteractive apt-get -yq install postgresql
COPY tests ./tests
RUN pip install -e .[test]
RUN useradd postgres-testing
USER postgres-testing
RUN useradd uta-tester
RUN chown -R uta-tester .
USER uta-tester
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ To develop UTA, follow these steps.
4. Testing

$ docker build --target uta-test -t uta-test .
$ docker run -it --rm -v $(pwd):/opt/repos/uta uta-test bash
$ python -m unittest
$ docker run -it --rm uta-test python -m unittest

## UTA update procedure

Expand Down

0 comments on commit 9249911

Please sign in to comment.