Real-Time Interactive Terminal #1489
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: Tests CI | |
| on: | |
| push: | |
| branches: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - "*" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Tests | |
| strategy: | |
| matrix: | |
| python-version: ["3.11.8"] | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_DB: pipeline | |
| POSTGRES_USER: pipeline | |
| POSTGRES_PASSWORD: pipeline123456 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| check-latest: true | |
| - name: Install redis | |
| run: | | |
| sudo apt update | |
| sudo apt install -y redis | |
| redis-server --version | |
| - name: Install requirements | |
| working-directory: api/tacticalrmm | |
| run: | | |
| python --version | |
| SETTINGS_FILE="tacticalrmm/settings.py" | |
| SETUPTOOLS_VER=$(grep "^SETUPTOOLS_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}') | |
| WHEEL_VER=$(grep "^WHEEL_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}') | |
| pip install pip==25.1 | |
| pip install setuptools==${SETUPTOOLS_VER} wheel==${WHEEL_VER} | |
| pip install -r requirements.txt -r requirements-test.txt | |
| - name: Codestyle black | |
| working-directory: api | |
| run: | | |
| black --exclude migrations/ --check --diff tacticalrmm | |
| if [ $? -ne 0 ]; then | |
| exit 1 | |
| fi | |
| - name: Lint with flake8 | |
| working-directory: api/tacticalrmm | |
| run: | | |
| flake8 --config .flake8 . | |
| if [ $? -ne 0 ]; then | |
| exit 1 | |
| fi | |
| - name: Run django tests | |
| env: | |
| GHACTIONS: "yes" | |
| working-directory: api/tacticalrmm | |
| run: | | |
| pytest | |
| if [ $? -ne 0 ]; then | |
| exit 1 | |
| fi | |
| - uses: codecov/codecov-action@v3 | |
| with: | |
| directory: ./api/tacticalrmm | |
| files: ./api/tacticalrmm/coverage.xml | |
| verbose: true |