forked from aws-cloudformation/cloudformation-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.36 KB
/
pr-ci.yaml
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
# This workflow will install Python dependencies, run tests and lint with a multiple versions of Python
name: CloudFormation CLI Pull Request CI
on: [push, pull_request]
jobs:
build:
env:
AWS_DEFAULT_REGION: us-east-1
strategy:
matrix:
python: [ 3.8, 3.9, "3.10", "3.11" ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install PYJQ dependencies on Macos
run: |
brew install autoconf automake libtool
brew install jq
if: matrix.os == 'macos-latest'
- name: Install PYJQ on non-Windows
run: |
pip install pyjq
if: matrix.os != 'windows-latest'
- name: Install dependencies
run: |
pip install --upgrade 'attrs==19.2.0' wheel -r requirements.txt
- name: Install cli
run: |
pip install .
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit/
key: ${{ matrix.os }}-${{ env.pythonLocation }}${{ hashFiles('.pre-commit-config.yaml') }}
- name: pre-commit, twine checks
run: |
pre-commit run --all-files
python setup.py sdist bdist_wheel
twine check ./dist/*