-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.53 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * MON"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python3 -m pip install --break-system-packages -q -r scripts/requirements.txt -r tests/requirements.txt
- name: Run ruff
run: |
python3 -m ruff check .
- name: Run isort
run: |
python3 -m isort --check --diff .
- name: Run mypy
run: |
python3 -m mypy .
- name: Run yamllint
run: |
python3 -m yamllint -d "{extends: default, rules: {document-start: {present: false}, line-length: disable, truthy: {check-keys: false}}}" .
- name: Run tests
run: |
python3 -m pytest tests
- name: Run action on successful test files
uses: ./
with:
pattern: tests/data/success/*.ipynb
- name: Run action on failing test files
uses: ./
with:
pattern: tests/data/fail/*.ipynb
expect-failure: true
warn:
runs-on: ubuntu-latest
if: github.repository == 'RBniCS/check-jupyter-metadata-action' && github.ref == 'refs/heads/main' && github.event_name == 'schedule'
steps:
- name: Warn if scheduled workflow is about to be disabled
uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main
with:
workflow-filename: ci.yml
days-elapsed: 50