Skip to content

Commit

Permalink
Update workflows (#43)
Browse files Browse the repository at this point in the history
* Update versions of github actions

* Narrow down permissions

* [DEVXP-725] Fix coveralls
  • Loading branch information
Erik van Brakel authored Feb 6, 2024
1 parent 9fe5322 commit 30bffca
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 20 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ jobs:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage
pip install coveralls
- name: Run tests
run: |
- name: Run tests
run: |
make unittest
- name: Coverage
- name: Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
deploy:
Expand All @@ -43,9 +43,9 @@ jobs:
needs: build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,41 @@
name: Tests

on: [ push, pull_request, workflow_dispatch ]
permissions:
contents: read
pull-requests: write

jobs:
build:
name: Tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage
pip install coveralls
- name: Run tests
run: |
- name: Run tests
run: |
make unittest
- name: Coverage
- name: Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}"
COVERALLS_SERVICE_NAME: github
COVERALLS_SERVICE_JOB_ID: "${{ github.run_id }}"
COVERALLS_SERVICE_NUMBER: "${{ github.workflow }}-${{ github.run_number }}"
run: |
coveralls

0 comments on commit 30bffca

Please sign in to comment.