Skip to content

Commit

Permalink
chore(BACK-7692): align CI with clear-signing-erc7730-registry (#222)
Browse files Browse the repository at this point in the history
- fix CODEOWNERS
- trigger updates on CAL on merge to main
- setup auto labeler
- setup dependabot Github actions updates
  • Loading branch information
jnicoulaud-ledger authored Sep 23, 2024
1 parent 89196cf commit a3d0a26
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 58 deletions.
2 changes: 0 additions & 2 deletions .github/CODEOWNERS

This file was deleted.

16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "[ci] "
labels:
- "ci"
assignees:
- "LedgerHQ/backend-core"
reviewers:
- "LedgerHQ/backend-core"
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
documentation:
- changed-files:
- any-glob-to-any-file: ['*.md']

descriptors:
- changed-files:
- any-glob-to-any-file: ['*/**/*.json']

ci:
- changed-files:
- any-glob-to-any-file: ['.github/**', '**/*.py', 'Pipfile*']
Empty file.
56 changes: 0 additions & 56 deletions .github/workflows/ci.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: main

on:
push:
branches:
- main

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

env:
PIPENV_NOSPIN: 1

jobs:
ci:
name: ci
runs-on: ubuntu-latest
timeout-minutes: 60
steps:

- name: Checkout
timeout-minutes: 10
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pipenv'

- name: Install pipenv
run: pip install -U pip pipenv wheel

- name: Install python dependencies
env:
PYPI_DEPLOY_TOKEN: ${{ secrets.PYPI_DEPLOY_TOKEN }}
run: pipenv sync --dev

- name: Validate files and format
id: validation
uses: selfagency/capture-output@v1
with:
cmd: pipenv
args: run,validate_files

update_cal:
runs-on: ubuntu-latest
needs: ci
timeout-minutes: 60
strategy:
matrix:
repo: ['LedgerHQ/crypto-assets', 'LedgerHQ/crypto-assets-clear-signing-initiative']
steps:
- name: Trigger update on ${{ matrix.repo }}
timeout-minutes: 60
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.CI_BOT_TOKEN }}
repository: ${{ matrix.repo }}
event-type: submodules
65 changes: 65 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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

env:
PIPENV_NOSPIN: 1

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: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pipenv'

- name: Install pipenv
run: pip install -U pip pipenv wheel

- name: Install python dependencies
env:
PYPI_DEPLOY_TOKEN: ${{ secrets.PYPI_DEPLOY_TOKEN }}
run: pipenv sync --dev

- name: Validate files and format
id: validation
uses: selfagency/capture-output@v1
with:
cmd: pipenv
args: run,validate_files
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @LedgerHQ/crypto-assets-owners

0 comments on commit a3d0a26

Please sign in to comment.