feat: enhance datafeed repository #21
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: Backend CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'service/**' | |
| - '.github/workflows/backend-ci.yml' | |
| - '.github/actions/service/**' | |
| pull_request: | |
| paths: | |
| - 'service/**' | |
| - '.github/workflows/backend-ci.yml' | |
| - '.github/actions/service/**' | |
| permissions: | |
| pull-requests: write | |
| env: | |
| DIRECTORY: service | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Setup backend | |
| uses: ./.github/actions/service/setup | |
| with: | |
| directory: ${{ env.DIRECTORY }} | |
| - name: Run ruff format | |
| run: cd ${{ env.DIRECTORY }} && uv run ruff format --diff | |
| check: | |
| needs: format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Setup backend | |
| uses: ./.github/actions/service/setup | |
| with: | |
| directory: ${{ env.DIRECTORY }} | |
| - name: Run ruff check | |
| run: cd ${{ env.DIRECTORY }} && uv run ruff check --output-format github | |
| # - name: Run pyright | |
| # run: uv run pyright | |
| tests: | |
| needs: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Setup service | |
| uses: ./.github/actions/service/setup | |
| with: | |
| directory: ${{ env.DIRECTORY }} | |
| - name: Run unit tests | |
| uses: ./.github/actions/service/pytest | |
| with: | |
| directory: ${{ env.DIRECTORY }} | |
| test_type: unit | |
| - name: Run integration tests | |
| uses: ./.github/actions/service/pytest | |
| with: | |
| directory: ${{ env.DIRECTORY }} | |
| test_type: integration | |
| - name: Report coverage to OctoCov | |
| uses: k1LoW/octocov-action@v1 | |
| with: | |
| work-dir: ${{ env.DIRECTORY }} | |
| continue-on-error: true | |