Skip to content

Commit

Permalink
Fix gha smells:
Browse files Browse the repository at this point in the history
- Avoid installing packages without version
- Define permissions for workflows with external actions
- Avoid running CI related actions when no source code has changed
- Stop running workflows when there is a newer commit in PR
  • Loading branch information
ceddy4395 committed May 24, 2024
1 parent e23e02f commit b936301
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,19 @@ name: Tox pytest all python versions
on:
push:
branches: [ main ]
paths:
- gpt_engineer/**
- tests/**
pull_request:
branches: [ main ]

concurrency:
group: ${{github.workflow}} - ${{github.ref}}
cancel-in-progress: true

jobs:
test:
permissions: {}
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -23,7 +31,7 @@ jobs:
cache: 'pip' #Note that pip is for the tox level. Poetry is still used for installing the specific environments (tox.ini)

- name: Install tox
run: pip install tox
run: pip install tox==4.15.0

- name: Run tox
env:
Expand Down

0 comments on commit b936301

Please sign in to comment.