Skip to content
Open
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
2 changes: 2 additions & 0 deletions .github/scripts/release-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ for f in "$root/README.md" "$root/osc_sdk_python/VERSION"; do
git add "$f"
done

uv version $(cat VERSION)

# Setup git && commit
git config user.name "Outscale Bot"
git config user.email "opensource+bot@outscale.com"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: ⬇️ Install Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install uv
uses: astral-sh/setup-uv@v6

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'osc-sdk-python release build' step
Uses Step
uses 'astral-sh/setup-uv' with ref 'v6', not a pinned commit hash
- name: Set up Python
run: uv python install
- name: Initialize submodules
run: make init
- name: Build release
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/code-check-identified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
uses: actions/checkout@v5
- name: ⬇️ Import Outscale API description
run: make init
- name: ⬇️ Install Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: ⬇️ Install Python dependencies
run: make .venv/ok
- name: Install uv
uses: astral-sh/setup-uv@v6

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Code check On outscale' step
Uses Step
uses 'astral-sh/setup-uv' with ref 'v6', not a pinned commit hash
- name: Set up Python
run: uv python install
- name: ⬇️ Build python package
run: make package
- name: 🧪 Run integration tests
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@
- uses: actions/checkout@v5
- name: Import Outscale API description
run: make init
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install Python dependencies
run: make .venv/ok
- name: Analysing the code with pylint
run: make test-pylint
- name: Security check - Bandit
run: make test-bandit
- name: Build python package
run: make package
- name: Install uv
uses: astral-sh/setup-uv@v6

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Code check Local' step
Uses Step
uses 'astral-sh/setup-uv' with ref 'v6', not a pinned commit hash
- name: Set up Python
run: uv python install
- name: Analysing the code
run: make test-lint
- name: Run integration tests
run: ./local-tests.sh
17 changes: 9 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
environment: publish
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'osc-sdk-python pip publishing' step
Uses Step
uses 'astral-sh/setup-uv' with ref 'v6', not a pinned commit hash
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Initialize submodules
run: make init
- name: Build packages
run: make package
- uses: pypa/gh-action-pypi-publish@release/v1
run: uv python install
- name: Check Code
run: make test
- name: Build & Push packages
run: make upload-package
env:
UV_PUBLISH_TOKEN: ${{ secrets.PIP_TOKEN }}
30 changes: 13 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,30 @@ help:
@echo "Available targets:"
@echo "- package: build python package"
@echo "- test: run all tests"
@echo "- test-pylint: check code with pylint"
@echo "- test-bandit: security check with bandit"
@echo "- test-lint: check code with pylint"
@echo "- test-int: run integration tests"
@echo "- osc-api-update: update to last osc-api version"
@echo "- clean: clean temp files, venv, etc"

.PHONY: test
test: clean test-pylint test-bandit test-int package
test: clean test-lint test-int package
@echo "All tests: OK"

.PHONY: test-pylint
test-pylint: .venv/ok
@./scripts/test_pylint.sh

.PHONY: test-bandit
test-bandit: .venv/ok
@./scripts/test_bandit.sh
.PHONY: test-lint
test-lint:
@uv tool run ruff check

.PHONY: test-int
test-int: .venv/ok init
./scripts/test_int.sh
test-int: init
@uv run pytest

.PHONY: package
package: .venv/ok init
@./scripts/package.sh
package: init
@uv build

.PHONY: upload-package
upload-package: package
@uv publish

.PHONY: osc-api-update
osc-api-update:
Expand All @@ -42,9 +41,6 @@ init: osc_sdk_python/osc-api/outscale.yaml
osc_sdk_python/osc-api/outscale.yaml:
git submodule update --init .

.venv/ok:
@./scripts/setup_venv.sh

.PHONY: clean
clean:
@echo cleaning...
Expand Down
Loading
Loading