Repository navigation
97 lines (83 loc) · 2.71 KB
/
Copy pathpython_docker_macos.yml
File metadata and controls
97 lines (83 loc) · 2.71 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Python On Docker (macOS)
on:
workflow_call:
inputs:
image_tag:
description: "Docker image tag or digest to pull"
required: false
type: string
secrets:
MAC_RUNNER_USER_PASSWORD:
description: "Keychain password for macOS runner"
required: true
jobs:
python_docker_macos:
# concurrency:
# group: macos-keploy-${{ github.ref }}
# cancel-in-progress: false
runs-on: [self-hosted, macOS, native]
strategy:
fail-fast: false
matrix:
include:
# - job: record_latest_replay_build
# record_src: latest
# replay_src: build
# - job: record_latest_replay_latest
# record_src: latest
# replay_src: latest
- job: record_build_replay_build
record_src: build
replay_src: build
name: ${{ matrix.job }} (macOS)
steps:
- name: Unlock keychain
if: runner.os == 'macOS'
run: |
security unlock-keychain -p $KEYCHAIN_PASSWORD
env:
KEYCHAIN_PASSWORD: ${{ secrets.MAC_RUNNER_USER_PASSWORD }}
- name: Clean up git config
if: always()
continue-on-error: true
run: |
rm -rf ~/.gitconfig
- name: Checkout repository
uses: actions/checkout@v4
- id: image
uses: ./.github/actions/download-image
with:
image_tag: ${{ inputs.image_tag }}
version: ${{ github.sha }}
- id: record
uses: ./.github/actions/download-binary
with:
src: ${{ matrix.record_src }}
- id: replay
uses: ./.github/actions/download-binary
with:
src: ${{ matrix.replay_src }}
- name: Checkout the samples-python repository
uses: actions/checkout@v4
with:
repository: keploy/samples-python
path: samples-python
- name: Run the flask-mongo application (macOS)
env:
RECORD_BIN: ${{ steps.record.outputs.path }}
REPLAY_BIN: ${{ steps.replay.outputs.path }}
JOB_ID: ${{ github.run_id }}-${{ github.job }}-${{ github.run_attempt }}
shell: bash
run: |
cd samples-python/flask-mongo
bash $GITHUB_WORKSPACE/.github/workflows/test_workflow_scripts/python-docker-macos.sh
- name: Kill the running script processes
if: always()
continue-on-error: true
run: |
pkill -f "bash $GITHUB_WORKSPACE/.github/workflows/test_workflow_scripts/python-docker-macos.sh" || true
- name: Clean up git config
if: always()
continue-on-error: true
run: |
git config --global --unset url."git@github.com:".insteadOf