diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml new file mode 100644 index 0000000..5d0d6ce --- /dev/null +++ b/.github/workflows/action.yml @@ -0,0 +1,48 @@ +name: Mailnesia Perl unittests + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: "5.32" + + - run: pwd + - run: cpanm --installdeps . --skip-satisfied + - run: perl -v + - run: prove -lv t + + # Service containers to start + services: + # Label used to access the service container + redis: + # Docker Hub image + image: redis + # + ports: + # Opens tcp port 6379 on the host and service container + - 6379:6379 + + postgres: + # Docker Hub image + image: postgres + # Provide the password for postgres + env: + POSTGRES_PASSWORD: postgres + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432