|  | 
| 6 | 6 |   # workflow_dispatch: | 
| 7 | 7 | 
 | 
| 8 | 8 | jobs: | 
| 9 |  | -  build: | 
| 10 |  | -    strategy: | 
| 11 |  | -      matrix: | 
| 12 |  | -        os: [ubuntu-latest, windows-latest] | 
| 13 |  | -        python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | 
| 14 |  | -      fail-fast: false | 
| 15 |  | -    runs-on: ${{ matrix.os }} | 
|  | 9 | +  deploy: | 
|  | 10 | +    runs-on: ubuntu-latest | 
| 16 | 11 | 
 | 
| 17 |  | -    steps: | 
| 18 |  | -      - uses: actions/checkout@v4 | 
| 19 |  | -      - uses: actions/setup-python@v5 | 
| 20 |  | -        with: | 
| 21 |  | -          python-version: ${{ matrix.python-version }} | 
| 22 |  | -          architecture: x64 | 
| 23 |  | - | 
| 24 |  | -      - name: Setup | 
| 25 |  | -        run: pip install .[dev] | 
|  | 12 | +    permissions: | 
|  | 13 | +      contents: write | 
| 26 | 14 | 
 | 
| 27 |  | -      - name: Lint | 
| 28 |  | -        run: black --diff --check --verbose . | 
|  | 15 | +    steps: | 
|  | 16 | +      - name: Checkout repository | 
|  | 17 | +        uses: actions/checkout@v2 | 
| 29 | 18 | 
 | 
| 30 |  | -      - name: Check schema is up to date | 
|  | 19 | +      - name: Setup Git | 
| 31 | 20 |         run: | | 
| 32 |  | -          python3 -m fortls.schema | 
| 33 |  | -          git diff --exit-code ./fortls/fortls.schema.json | 
| 34 |  | -
 | 
| 35 |  | -      - name: Unittests | 
| 36 |  | -        run: pytest --doctest-modules -n auto | 
|  | 21 | +          git config user.name "github-actions[bot]" | 
|  | 22 | +          git config user.email "github-actions[bot]@users.noreply.github.com" | 
| 37 | 23 | 
 | 
| 38 |  | -      - name: Upload coverage to Codecov | 
| 39 |  | - | 
| 40 |  | -        with: | 
| 41 |  | -          fail_ci_if_error: true | 
| 42 |  | -          verbose: true | 
|  | 24 | +      - name: Run tests and upload coverage | 
| 43 | 25 |         env: | 
| 44 | 26 |           CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | 
|  | 27 | +        run: | | 
|  | 28 | +          # Run your tests | 
|  | 29 | +          # Upload coverage to Codecov | 
|  | 30 | +          bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN | 
|  | 31 | +
 | 
|  | 32 | +      - name: Build and Deploy | 
|  | 33 | +        run: | | 
|  | 34 | +          # Commands to build and deploy documentation | 
|  | 35 | +          git checkout -b gh-pages | 
|  | 36 | +          git add -A | 
|  | 37 | +          git commit -m "Deploy preview for PR ${GITHUB_REF##*/} 🛫" | 
|  | 38 | +          git push --force origin gh-pages | 
0 commit comments