ci: setup continuous integration #13
Workflow file for this run
This file contains 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: pull request | |
on: | |
pull_request: | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pull_request: | |
name: pull request | |
runs-on: public-ledgerhq-shared-small | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout | |
timeout-minutes: 10 | |
uses: actions/checkout@v4 | |
- name: Add labels | |
timeout-minutes: 30 | |
uses: actions/labeler@v5 | |
- name: Enforce labels | |
timeout-minutes: 5 | |
uses: mheap/github-action-required-labels@v5 | |
with: | |
mode: minimum | |
count: 1 | |
labels: | | |
documentation | |
specifications | |
descriptors | |
ci | |
add_comment: true | |
- name: Get all changed descriptor files | |
timeout-minutes: 5 | |
id: changed-descriptor-files | |
uses: tj-actions/changed-files@v45 | |
with: | |
files: | | |
registry/**/eip712-*.json | |
registry/**/calldata-*.json | |
- name: Setup python | |
timeout-minutes: 10 | |
if: steps.changed-descriptor-files.outputs.any_changed == 'true' | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Login to Ledger JFrog | |
timeout-minutes: 10 | |
if: steps.changed-descriptor-files.outputs.any_changed == 'true' | |
uses: LedgerHQ/actions-security/actions/jfrog-login@actions/jfrog-login-1 | |
- name: Setup pip | |
timeout-minutes: 10 | |
if: steps.changed-descriptor-files.outputs.any_changed == 'true' | |
run: jf pipc --global --repo-resolve=virtual-pypi-prod-green | |
- name: Install ERC-7730 library | |
timeout-minutes: 10 | |
if: steps.changed-descriptor-files.outputs.any_changed == 'true' | |
run: jf pip install 'erc7730==0.0.8' | |
- name: Validate ERC-7730 descriptors changed in pull requests | |
timeout-minutes: 10 | |
if: steps.changed-descriptor-files.outputs.any_changed == 'true' | |
run: erc7730 lint ${{ steps.changed-descriptor-files.outputs.all_changed_files }} --gha |