chore: migrate to codecov (#388) #963
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: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| workflow_dispatch: ~ | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.14' | |
| - name: Install Dependencies | |
| run: just install | |
| - name: Lint | |
| run: just lint | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # vcrpy is not compatible with Python 3.14 yet so we cannot test against it | |
| pythonversion: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.pythonversion }} | |
| - name: Install Dependencies | |
| run: just install | |
| - name: Run Tests | |
| run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just coverage | |
| - name: Coverage | |
| if: github.ref == 'refs/heads/master' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Run security analysis | |
| run: just scan | |
| docs: | |
| if: github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.14' | |
| - name: Install Dependencies | |
| run: just install | |
| - name: Generate Docs | |
| run: just docs | |
| - name: Deploy Docs | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs |