Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move Python version specification to a file #30

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ansible-tests-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ jobs:
- name: install make
run: sudo apt-get install -y build-essential

- name: setup python 3
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: checkout Python SDK, this PR
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}

- name: setup python 3
uses: actions/setup-python@v5
with:
python-version-file: .python-version

- name: checkout Ansible collection
uses: actions/checkout@v4
with:
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ssh-key: ${{ secrets.DEPLOY_KEY }}

- name: Install Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version

- name: Install dependencies
working-directory: ${{ env.PACKAGE_DIR }}
run: |
python -m pip install --upgrade build

- name: Install pyaml for patching script
working-directory: ${{ env.PACKAGE_DIR }}
run: |
python -m pip install pyaml

- name: Create GitHub release
uses: cycjimmy/semantic-release-action@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sync-fabricv4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: GitHub user
run: |
# https://api.github.com/users/github-actions[bot]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sync-metalv1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: GitHub user
run: |
# https://api.github.com/users/github-actions[bot]
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/test-codegen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,21 @@ jobs:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install pyaml for patching script
working-directory: ${{ env.PACKAGE_DIR }}
python-version-file: .python-version

- name: Install pyaml for Metal patching script
run: |
python -m pip install pyaml
- name: Checkout code
uses: actions/checkout@v4

- name: Verify Patches
run: make patch-all

- name: Generate
run: |
make generate-all
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ coverage.xml
.hypothesis/
venv/
.venv/
.python-version
.pytest_cache

# Translations
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
8 changes: 4 additions & 4 deletions templates/.github/workflows/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: GitHub user
run: |
# https://api.github.com/users/github-actions[bot]
Expand Down
Loading