-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (51 loc) · 2.02 KB
/
run-tests.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
48
49
50
51
52
53
54
55
56
57
name: Run Tests
on:
workflow_call:
inputs:
tests: { required: false, type: string, default: "*_test.py"}
config: { required: true, type: string }
flags: { required: true, type: string }
runner: { required: false, type: string, default: "ubuntu-24.04" }
mgc_version: { required: false, type: string, default: "0.34.0" }
secrets:
PROFILES: { required: true }
jobs:
build:
runs-on: ${{ inputs.runner }}
container:
image: ghcr.io/marmotitude/s3-tester:tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "0.5.9"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Install the project
run: uv sync --no-dev
- name: Install MGC
run: |
MGC_VERSION="${{ inputs.mgc_version }}"
curl -Lo mgc.tar.gz "https://github.com/MagaluCloud/mgccli/releases/download/v${MGC_VERSION}/mgccli_${MGC_VERSION}_linux_amd64.tar.gz"
tar xzvf mgc.tar.gz
rm mgc.tar.gz
cp "./mgc" /usr/local/bin/mgc
- name: Configure Profiles
run: |
echo "${{ secrets.PROFILES }}" > profiles.yaml
sha256sum profiles.yaml
sha256sum ./bin/configure_profiles.py
echo "Configuring Profiles..."
uv run python ./bin/configure_profiles.py ./profiles.yaml
- name: Run tests ${{ inputs.tests }}
run: |
cd docs
sha256sum $(which mgc rclone aws)
uv run pytest --config ${{ inputs.config }} ${{ inputs.tests }} ${{ inputs.flags }}