Skip to content

Commit 416195c

Browse files
authored
Pytest plugin fork (#13)
* updated: workflow to support caching * fix: branch name * added: schedule for workflow * workflow run: all services * fix: dependancy caching in go * updated: changed the service to check caching * removed: comment from gh workflow * updated: workflow finalization
1 parent 4a8ed4f commit 416195c

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
on:
2+
schedule:
3+
- cron: '0 19 * * 6'
24
workflow_dispatch:
35
inputs:
46
services:
@@ -10,9 +12,10 @@ on:
1012
type: string
1113
default: 'localstack/localstack:latest'
1214
description: localstack docker image name to test against
13-
push:
14-
branches:
15-
- pytest-plugin
15+
# disabled pipeline for push events, as we want to run the pipeline only on a schedule or manually
16+
# push:
17+
# branches:
18+
# - pytest-plugin-fork
1619

1720
name: Terraform Tests
1821
jobs:
@@ -45,12 +48,15 @@ jobs:
4548

4649
- uses: actions/setup-go@v3
4750
with:
48-
go-version: 1.18.x
51+
go-version: '1.18.x'
52+
cache: true
53+
cache-dependency-path: terraform-provider-aws/go.sum
4954

5055
- name: Set up Python 3.10.5
5156
uses: actions/setup-python@v4
5257
with:
5358
python-version: '3.10.5'
59+
cache: 'pip'
5460

5561
- name: Install system dependencies
5662
run: |
@@ -72,7 +78,6 @@ jobs:
7278
7379
- name: Run ${{ matrix.service }} Tests
7480
run: |
75-
echo "::remove-matcher owner=python::"
7681
pytest --junitxml=target/reports/pytest.xml terraform-provider-aws/internal/service/${{ matrix.service }} -s -v --ls-start --ls-image ${{ github.event.inputs.localstack-image || 'localstack/localstack:latest' }}
7782
7883
- name: Publish ${{ matrix.service }} Test Results

conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def runtest(self):
4848
'AWS_DEFAULT_REGION': 'us-west-2',
4949
'AWS_ALTERNATE_ACCESS_KEY_ID': 'test',
5050
'AWS_ALTERNATE_SECRET_ACCESS_KEY': 'test',
51+
'AWS_ALTERNATE_SECRET_ACCESS_KEY': 'test',
5152
'AWS_ALTERNATE_REGION': 'us-east-2',
5253
'AWS_THIRD_REGION': 'eu-west-1',
5354
})

requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
click
2-
pytest
3-
docker
4-
requests
5-
pytest-xdist
1+
click==8.1.3
2+
pytest==7.2.0
3+
docker==6.0.1
4+
requests==2.28.2

0 commit comments

Comments
 (0)