-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constrain CI triggers #266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some notes inline 👍 Maybe instead of duplicating the manticore workflow, we could convert it into a reusable workflow: https://docs.github.com/en/actions/using-workflows/reusing-workflows
- "**.rs" | ||
- "**.py" | ||
paths: | ||
- "program-analysis/echidna/**/*.sol" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add the echidna yaml configs, and the workflow yaml file itself?
.github/workflows/deploy.yml
Outdated
@@ -3,6 +3,8 @@ on: | |||
push: | |||
branches: | |||
- master | |||
paths: | |||
- "**.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also include things like images, css and other static/
resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking was that if a new static resource is added, it must be referenced somewhere in the .md, right? Otherwise it's just part of the github repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the resources could be edited on their own (e.g modify a diagram, or update the CSS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah I see, I was somehow expecting them to be directly linked to the github-hosted resources. Maybe then it's easier to only exclude code files (if #264 is merged). Otherwise, I'll just keep it unrestricted for now...
.github/workflows/slither.yml
Outdated
env: | ||
TEST_TYPE: ${{ matrix.type }} | ||
TEST_TYPE: slither |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This env variable is now unused, so it can be dropped
.github/workflows/manticore.yml
Outdated
env: | ||
TEST_TYPE: manticore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This env variable is unused, so it can be dropped
I'm not so familiar with workflows yet. If we want to keep them in one file like before, do you mind showing me how? |
With reusable workflows you'd still need separate files, but at least the steps would not be duplicated. It may not be worth the effort though, these workflows are rather small. Untested sample below, refer to the docs if you want to try it and it doesn't work 😅 manticore.yml (similar for slither.yml) name: Run Manticore tests
on:
push:
paths:
- ".github/workflows/manticore.yml"
- "program-analysis/manticore/**/*.py"
branches:
- master
pull_request:
paths:
- ".github/workflows/manticore.yml"
- "program-analysis/manticore/**/*.py"
schedule:
# run CI every day even if no PRs/merges occur
- cron: "0 12 * * *"
jobs:
tests:
uses: ./.github/workflows/python-test.yml
with:
tool: manticore
secrets: inherit python-test.yml on:
workflow_call:
inputs:
tool:
required: true
type: string
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install solc-select
solc-select install 0.5.11
solc-select use 0.5.11
- name: Run Tests
run: |
bash program-analysis/${{ inputs.tool }}/scripts/gh_action_test.sh |
I guess I'll leave it as is for now. We might want to change it when we get more CI workflows in the future. |
Some action triggers can be further restricted. Re #214