Skip to content

Commit 8362025

Browse files
committed
chore(deps): update to pact v2 and python 3.11
1 parent 1314555 commit 8362025

File tree

6 files changed

+865
-387
lines changed

6 files changed

+865
-387
lines changed

.env

Whitespace-only changes.

.github/workflows/build.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,10 @@ jobs:
1414
test:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- uses: actions/setup-python@v4
1919
with:
20-
python-version: "3.8"
21-
# - name: Install python version
22-
# uses: gabrielfalcao/pyenv-action@v10
23-
# with:
24-
# default: 3.8.13
25-
# command: pip install -U pip # upgrade pip after installing python
26-
# - name: Create virtualenv for python 3.5.7
27-
# run: pyenv local 3.8.13 && python3 -mvenv .venv
28-
# - name: venv
29-
# run: pyenv local 3.8.13 && python3 -mvenv .venv3813
20+
python-version: "3.11"
3021
- name: install pyenv
3122
run: curl https://pyenv.run | bash
3223
- name: set pyenv on path
@@ -46,9 +37,8 @@ jobs:
4637
- name: Activate virtual env
4738
run: |
4839
source .venv/bin/activate
49-
make test
50-
# - name: Test
51-
# run: make test
40+
- name: Test
41+
run: make test
5242
- name: Publish pacts
5343
run: GIT_BRANCH=${GIT_REF:11} make publish_pacts
5444

Makefile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ ci: test publish_pacts can_i_deploy $(DEPLOY_TARGET)
2222
# Run the ci target from a developer machine with the environment variables
2323
# set as if it was on Travis CI.
2424
# Use this for quick feedback when playing around with your workflows.
25-
fake_ci: .env
25+
fake_ci:
2626
CI=true \
2727
GIT_COMMIT=`git rev-parse --short HEAD`+`date +%s` \
2828
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` \
2929
make ci
3030

3131

32-
publish_pacts: .env
32+
publish_pacts:
3333
@"${PACT_CLI}" publish ${PWD}/pacts --consumer-app-version ${GIT_COMMIT} --tag ${GIT_BRANCH} --branch ${GIT_BRANCH}
3434

3535
## =====================
3636
## Build/test tasks
3737
## =====================
3838

39-
test: .env
39+
test:
4040
python3 -m pytest
4141

4242
## =====================
@@ -51,7 +51,7 @@ deploy: deploy_app record_deployment
5151
no_deploy:
5252
@echo "Not deploying as not on main branch"
5353

54-
can_i_deploy: .env
54+
can_i_deploy:
5555
@"${PACT_CLI}" broker can-i-deploy \
5656
--pacticipant ${PACTICIPANT} \
5757
--version ${GIT_COMMIT} \
@@ -62,7 +62,7 @@ can_i_deploy: .env
6262
deploy_app:
6363
@echo "Deploying to production"
6464

65-
record_deployment: .env
65+
record_deployment:
6666
@"${PACT_CLI}" broker record-deployment --pacticipant ${PACTICIPANT} --version ${GIT_COMMIT} --environment production
6767

6868
## =====================
@@ -101,16 +101,13 @@ test_github_webhook:
101101
## Misc
102102
## ======================
103103

104-
.env:
105-
touch .env
106-
107104
.PHONY: test
108105

109106
## ======================
110107
## Python additions
111108
## ======================
112109
PROJECT := example-consumer-python-sns
113-
PYTHON_MAJOR_VERSION := 3.8
110+
PYTHON_MAJOR_VERSION := 3.11
114111

115112
sgr0 := $(shell tput sgr0)
116113
red := $(shell tput setaf 1)

0 commit comments

Comments
 (0)