-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodingagent.yaml
More file actions
83 lines (69 loc) · 2 KB
/
codingagent.yaml
File metadata and controls
83 lines (69 loc) · 2 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Reliability CI
on:
push:
branches: [ "main", "agent/**" ]
pull_request:
branches: [ "main" ]
jobs:
python:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('**/requirements*.txt') }}
restore-keys: pip-${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flask ecdsa pytest pytest-cov
- name: Run tests
run: |
pytest -q --maxfail=1 --disable-warnings --cov=simulator || echo "PYTEST_FAILED" > .agent/status
- name: Upload coverage
if: ${{ hashFiles('.agent/status') == '' }}
uses: actions/upload-artifact@v4
with:
name: coverage-python
path: ./.coverage*
node:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: npm-${{ runner.os }}-
- name: Install
run: |
if [ -f package.json ]; then npm ci; else echo "No package.json"; fi
- name: Lint
run: |
if [ -f package.json ]; then npx eslint . || echo "ESLINT_FAILED" > .agent/status; fi
aggregate:
runs-on: ubuntu-latest
needs: [python, node]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Aggregate status
run: |
if [ -f .agent/status ]; then
echo "CI failed. See job logs."
exit 1
fi
echo "CI green."