-
Notifications
You must be signed in to change notification settings - Fork 16
47 lines (42 loc) · 1.28 KB
/
python.yml
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python
on:
push:
branches:
- main
paths:
- 'python/**'
pull_request:
branches:
- main
paths:
- 'python/**'
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Sauce Connect
uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: "sauce-bindings-${{ github.sha }}"
region: us-west
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Test with pytest
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: |
make python_tests
- name: Sauce Connect cleanup
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: sauce-connect-log
path: ${{ env.SAUCE_CONNECT_DIR_IN_HOST }}/sauce-connect.log