diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index f00b6d6..df072c2 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -7,8 +7,8 @@ on: branches: [ main ] jobs: - lint: - name: Lint and Format Check + verify: + name: Lint and Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,29 +18,16 @@ jobs: with: python-version: '3.11' - - name: Install pre-commit + - name: Lint - Install pre-commit run: pip install pre-commit - - name: Run pre-commit + - name: Lint - Run pre-commit run: pre-commit run --all-files - test: - name: Unit Tests - runs-on: ubuntu-latest - needs: [ lint ] - steps: - - uses: actions/checkout@v4 + - name: Test - Install dependencies + run: pip install pyserial pytest - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - - name: Install dependencies - run: | - pip install pyserial pytest - - - name: Run integration tests (client validation) + - name: Test - Run integration tests run: | cd test python -m pytest kiss_client.py -v 2>/dev/null || echo "Note: Full integration tests require simulator" @@ -49,7 +36,7 @@ jobs: build: name: Build ${{ matrix.target }} runs-on: ubuntu-latest - needs: [ test ] + needs: [ verify ] strategy: fail-fast: false matrix: @@ -65,15 +52,15 @@ jobs: with: python-version: '3.11' + - name: Install PlatformIO + run: pip install platformio + - name: Cache PlatformIO uses: actions/cache@v3 with: path: ~/.platformio key: ${{ runner.os }}-platformio-${{ hashFiles('**/platformio.ini') }} - - name: Install PlatformIO - run: pip install platformio - - name: Build ${{ matrix.target }} run: pio run -e ${{ matrix.target }} @@ -122,12 +109,12 @@ jobs: summary: name: Build Summary runs-on: ubuntu-latest - needs: [ lint, test, build, publish-packages ] + needs: [ verify, build, publish-packages ] if: always() steps: - name: Check status run: | - if [ "${{ needs.lint.result }}" = "failure" ] || [ "${{ needs.test.result }}" = "failure" ] || [ "${{ needs.build.result }}" = "failure" ]; then + if [ "${{ needs.verify.result }}" = "failure" ] || [ "${{ needs.build.result }}" = "failure" ]; then echo "❌ CI failed" exit 1 fi