-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (60 loc) · 1.99 KB
/
test-commit.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: test-commit
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout Pyramid-Scheme
run: git submodule update --init # --recursive
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh && uv --version
- name: Install test dependencies
run: |
uv pip install --system --upgrade wheel setuptools
uv pip install --system --upgrade coverage pytest black mypy
- name: Install psll
run: uv pip install --system "psll @ ."
- name: Check with black
run: black --preview --check --verbose .
- name: Check with mypy
run: mypy --config-file ./mypy.ini psll
- name: Run tests and coverage
run: bash test.sh -e -c
- name: Push to coveralls
run: |
uv pip install --system --upgrade coveralls
coveralls debug --service=github
# Performance check
- name: Run performance check
run: python ./perf/perf_ascii_trees.py result.perf && cat result.perf
- name: Checkout psll-perf branch
uses: actions/checkout@v3
with:
ref: psll-perf
path: temp-perf
- name: Append performance data
run: |
cd ./temp-perf
cat ../result.perf | tail -n +2 | awk -v sha=$GITHUB_SHA '{ f = "./data/" $1 ".data"; $1 = sha; print >> f }'
- name: Push to psll-perf
run: |
cd ./temp-perf
git status
git config user.name github-actions
git config user.email [email protected]
git commit -a -m "Automated report"
git push