re-use cmlxc workflow, replacing CI with hetzner staging servers with local lxc containers #5584
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| jobs: | |
| tox: | |
| name: isolated chatmaild tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Checkout pull request HEAD commit instead of merge commit | |
| # Otherwise `test_deployed_state` will be unhappy. | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: download filtermail | |
| run: curl -L https://github.com/chatmail/filtermail/releases/download/v0.6.1/filtermail-x86_64 -o /usr/local/bin/filtermail && chmod +x /usr/local/bin/filtermail | |
| - name: run chatmaild tests | |
| working-directory: chatmaild | |
| run: pipx run tox | |
| scripts: | |
| name: deploy-chatmail tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: initenv | |
| run: scripts/initenv.sh | |
| - name: append venv/bin to PATH | |
| run: echo venv/bin >>$GITHUB_PATH | |
| - name: run formatting checks | |
| run: cmdeploy fmt -v | |
| - name: run deploy-chatmail offline tests | |
| run: pytest --pyargs cmdeploy | |
| lxc-test: | |
| name: LXC deploy and test | |
| uses: chatmail/cmlxc/.github/workflows/lxc-test.yml@main | |
| with: | |
| cmlxc_commands: | | |
| cmlxc init --cmdeploy ./repo | |
| cmlxc deploy-cmdeploy -vv cm0 cm1 | |
| cmlxc test-mini cm0 cm1 | |
| cmlxc test-cmdeploy -vv cm0 cm1 | |
| cmlxc deploy-cmdeploy -vv cm2 --ipv4-only | |
| cmlxc test-cmdeploy -vv cm0 cm2 |