ci: add test workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit & Acceptance Tests | |
on: | |
push: | |
branches: | |
- main | |
- test-ci | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install podman | |
run: sudo apt-get -y install podman | |
- name: Setup kernel unpriviledged port start | |
run: sudo sysctl net.ipv4.ip_unprivileged_port_start=80 | |
- name: Configure hosts redirection | |
run: echo '127.0.0.1 ipa.example.test' | sudo tee -a /etc/hosts | |
- name: Setup test environment | |
run: make prepare-dev-env | |
- name: Run unit tests | |
run: make test | |
- name: Run acceptance tests | |
run: make testacc | |
- name: Destroy test environment | |
run: make stop-dev-env |