test(prosody-plugins): add integration and unit tests with Allure reporting #27
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: Prosody Plugin Tests | |
| on: | |
| push: | |
| paths: | |
| - 'resources/prosody-plugins/**' | |
| - 'tests/prosody/**' | |
| pull_request: | |
| paths: | |
| - 'resources/prosody-plugins/**' | |
| - 'tests/prosody/**' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: tests/prosody/package-lock.json | |
| - name: Install Lua and busted | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y --no-install-recommends lua5.4 luarocks libssl-dev | |
| sudo luarocks install busted | |
| sudo luarocks install basexx | |
| sudo luarocks install openssl | |
| sudo luarocks install lua-cjson | |
| - name: Install test dependencies | |
| run: npm install | |
| working-directory: tests/prosody | |
| - name: Run tests | |
| run: npm test | |
| working-directory: tests/prosody | |
| - name: Upload Allure report | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: allure-report | |
| path: tests/prosody/allure-report | |
| retention-days: 30 |