forked from amazon-braket/amazon-braket-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (74 loc) · 2.27 KB
/
Copy pathadditional-pr-checks.yml
File metadata and controls
80 lines (74 loc) · 2.27 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
name: Additional pull request checks
on:
pull_request:
branches:
- main
- public-main
- feature/**
permissions:
contents: read
jobs:
dependent-tests:
runs-on: ubuntu-latest
strategy:
matrix:
dependent:
- amazon-braket-pennylane-plugin-python
steps:
- uses: actions/checkout@v6
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --upgrade git+https://github.com/aws/amazon-braket-schemas-python.git@main
pip install --upgrade git+https://github.com/aws/amazon-braket-default-simulator-python.git@main
pip install -e .
cd ..
git clone https://github.com/aws/${{ matrix.dependent }}.git
cd ${{ matrix.dependent }}
# Update the amazon-braket-sdk dependency to reference the current commit
python ${GITHUB_WORKSPACE}/.github/scripts/update_dependency.py
pip install -e .[test]
- name: Run unit tests
run: |
cd ../${{ matrix.dependent }}
pytest
check-code-format:
name: Check code format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install tox
- name: Run code format checks
run: |
tox -e linters_check
twine-check:
name: Check PyPI long description
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install build tools
run: python -m pip install --user --upgrade build twine
- name: Build a binary wheel and a source tarball
run: python -m build
- name: Check that long description will render correctly on PyPI.
run: twine check dist/*