Skip to content

Commit

Permalink
blacksmith.sh: Migrate workflows to Blacksmith (#403)
Browse files Browse the repository at this point in the history
* Migrate workflows to Blacksmith

* Removed "if: startsWith(matrix.os, ubuntu-)"

---------

Co-authored-by: blacksmith-sh[bot] <157653362+blacksmith-sh[bot]@users.noreply.github.com>
Co-authored-by: Tomer Nosrati <tomer.nosrati@gmail.com>
  • Loading branch information
blacksmith-sh[bot] and Nusnus authored Sep 12, 2024
1 parent abf01f0 commit 53d2b1e
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2204
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2204
env:
POETRY_VIRTUALENVS_CREATE: "false"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:

jobs:
build-worker:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2204
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand Down
45 changes: 18 additions & 27 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -70,16 +69,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -103,16 +101,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -136,16 +133,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -169,16 +165,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down Expand Up @@ -208,16 +203,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -241,16 +235,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -274,16 +267,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -307,16 +299,15 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [pull_request]
jobs:
check:
name: ${{ matrix.check }} check
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2204
strategy:
matrix:
check: [lint, mypy]
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/parallel-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Fetch Docker Images
Expand All @@ -47,19 +47,17 @@ jobs:
docker pull memcached:latest
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/setup.py'

- name: Install Poetry
if: startsWith(matrix.os, 'ubuntu-')
uses: snok/install-poetry@v1.4.1

- name: Install tox
Expand All @@ -79,7 +77,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Fetch Docker Images
Expand All @@ -89,19 +87,17 @@ jobs:
docker pull memcached:latest
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/setup.py'

- name: Install Poetry
if: startsWith(matrix.os, 'ubuntu-')
uses: snok/install-poetry@v1.4.1

- name: Install tox
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Fetch Docker Images
Expand All @@ -47,19 +47,17 @@ jobs:
docker pull memcached:latest
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/setup.py'

- name: Install Poetry
if: startsWith(matrix.os, 'ubuntu-')
uses: snok/install-poetry@v1.4.1

- name: Install tox
Expand Down Expand Up @@ -89,7 +87,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Fetch Docker Images
Expand All @@ -99,19 +97,17 @@ jobs:
docker pull memcached:latest
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/setup.py'

- name: Install Poetry
if: startsWith(matrix.os, 'ubuntu-')
uses: snok/install-poetry@v1.4.1

- name: Install tox
Expand All @@ -134,7 +130,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest"]
os: ["blacksmith-4vcpu-ubuntu-2204"]

steps:
- name: Fetch Docker Images
Expand All @@ -144,19 +140,17 @@ jobs:
docker pull memcached:latest
- name: Install apt packages
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt update
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: useblacksmith/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/setup.py'

- name: Install Poetry
if: startsWith(matrix.os, 'ubuntu-')
uses: snok/install-poetry@v1.4.1

- name: Install tox
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: Semgrep
jobs:
semgrep:
name: Scan
runs-on: ubuntu-20.04
runs-on: blacksmith-4vcpu-ubuntu-2204
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
container:
Expand Down

0 comments on commit 53d2b1e

Please sign in to comment.