Skip to content

Commit fb25a47

Browse files
committed
feat(ci): add matrix os choice
1 parent 59be277 commit fb25a47

File tree

1 file changed

+84
-70
lines changed

1 file changed

+84
-70
lines changed

.github/workflows/integration-test.yml

Lines changed: 84 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -17,87 +17,101 @@ on:
1717
- cron: "0 0 * * 0"
1818
workflow_dispatch:
1919
inputs:
20-
runner-os:
21-
default: ubuntu-latest
22-
type: choice
23-
options:
24-
- ubuntu-latest
25-
- macos-latest
20+
ubuntu-latest:
21+
type: boolean
22+
default: true
23+
macos-latest:
24+
type: boolean
25+
default: false
2626

2727

2828
jobs:
29-
run-it-tests-job:
30-
runs-on: ${{ inputs.runner-os || 'ubuntu-latest' }}
29+
get-selected-os:
30+
runs-on: ubuntu-latest
31+
outputs: # This needs to be set if you want to consume the output on another job
32+
os-runners: '[${{ toJson(steps.get-selected-os.outputs.selected) }}]'
3133
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v2
34+
- name: Get selected runner OS
35+
id: get-selected-os
36+
run: |
37+
echo "${{ toJson(inputs) }}"
3438
35-
- name: Set up Python 3.11
36-
id: setup-python
37-
uses: actions/setup-python@v2
38-
with:
39-
python-version: 3.11
39+
# run-it-tests-job:
40+
# needs: get-selected-os
41+
# strategy:
42+
# matrix:
43+
# os: ${{ fromJson(needs.get-selected-os.outputs.os-runners) }}
44+
# runs-on: ${{ matrix.os }}
45+
# steps:
46+
# - name: Checkout
47+
# uses: actions/checkout@v2
4048

41-
- name: Docker setup (macos only)
42-
id: setup-docker-mac
43-
if: ${{ runner.os == 'macOS' }}
44-
run: |
45-
brew install docker
46-
colima start
49+
# - name: Set up Python 3.11
50+
# id: setup-python
51+
# uses: actions/setup-python@v2
52+
# with:
53+
# python-version: 3.11
4754

48-
- name: Set up Project
49-
run: |
50-
pip install -r requirements-dev.txt
55+
# - name: Docker setup (macos only)
56+
# id: setup-docker-mac
57+
# if: ${{ runner.os == 'macOS' }}
58+
# run: |
59+
# brew install docker
60+
# colima start
5161

52-
- name: Start LocalStack
53-
uses: LocalStack/setup-localstack@v0.2.0
54-
with:
55-
image-tag: 'latest'
56-
use-pro: 'true'
57-
configuration: LS_LOG=trace
58-
install-awslocal: 'true'
59-
env:
60-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
62+
# - name: Set up Project
63+
# run: |
64+
# pip install -r requirements-dev.txt
6165

62-
- name: Deploy infrastructure
63-
run: |
64-
bin/deploy.sh
66+
# - name: Start LocalStack
67+
# uses: LocalStack/setup-localstack@v0.2.0
68+
# with:
69+
# image-tag: 'latest'
70+
# use-pro: 'true'
71+
# configuration: LS_LOG=trace
72+
# install-awslocal: 'true'
73+
# env:
74+
# LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
6575

66-
- name: Run Tests
67-
env:
68-
AWS_DEFAULT_REGION: us-east-1
69-
AWS_REGION: us-east-1
70-
AWS_ACCESS_KEY_ID: test
71-
AWS_SECRET_ACCESS_KEY: test
72-
run: |
73-
pytest tests
76+
# - name: Deploy infrastructure
77+
# run: |
78+
# bin/deploy.sh
7479

75-
- name: Show localstack logs
76-
if: always()
77-
run: |
78-
localstack logs
80+
# - name: Run Tests
81+
# env:
82+
# AWS_DEFAULT_REGION: us-east-1
83+
# AWS_REGION: us-east-1
84+
# AWS_ACCESS_KEY_ID: test
85+
# AWS_SECRET_ACCESS_KEY: test
86+
# run: |
87+
# pytest tests
7988

80-
- name: Send a Slack notification
81-
if: failure() || github.event_name != 'pull_request'
82-
uses: ravsamhq/notify-slack-action@v2
83-
with:
84-
status: ${{ job.status }}
85-
token: ${{ secrets.GITHUB_TOKEN }}
86-
notification_title: "{workflow} has {status_message}"
87-
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
88-
footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Workflow run>"
89-
notify_when: "failure"
90-
env:
91-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
89+
# - name: Show localstack logs
90+
# if: always()
91+
# run: |
92+
# localstack logs
9293

93-
- name: Generate a Diagnostic Report
94-
if: failure()
95-
run: |
96-
curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz
94+
# - name: Send a Slack notification
95+
# if: failure() || github.event_name != 'pull_request'
96+
# uses: ravsamhq/notify-slack-action@v2
97+
# with:
98+
# status: ${{ job.status }}
99+
# token: ${{ secrets.GITHUB_TOKEN }}
100+
# notification_title: "{workflow} has {status_message}"
101+
# message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
102+
# footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Workflow run>"
103+
# notify_when: "failure"
104+
# env:
105+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
106+
107+
# - name: Generate a Diagnostic Report
108+
# if: failure()
109+
# run: |
110+
# curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz
97111

98-
- name: Upload the Diagnostic Report
99-
if: failure()
100-
uses: actions/upload-artifact@v3
101-
with:
102-
name: diagnose.json.gz
103-
path: ./diagnose.json.gz
112+
# - name: Upload the Diagnostic Report
113+
# if: failure()
114+
# uses: actions/upload-artifact@v3
115+
# with:
116+
# name: diagnose.json.gz
117+
# path: ./diagnose.json.gz

0 commit comments

Comments
 (0)