-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
109 changed files
with
2,890 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
min: &min | ||
python-version: '3.7' | ||
os: ubuntu-latest | ||
|
||
max: &max | ||
python-version: '3.11' | ||
os: ubuntu-latest | ||
|
||
matrix: | ||
small: | ||
- server-version: latest | ||
<<: *max | ||
full: &full | ||
- server-version: latest | ||
<<: *min | ||
- server-version: latest | ||
<<: *max | ||
nightly: *full |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/samba* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,8 @@ on: | |
value: ${{ jobs.get-matrix.outputs.matrix-s3 }} | ||
matrix-sftp: | ||
value: ${{ jobs.get-matrix.outputs.matrix-sftp }} | ||
matrix-samba: | ||
value: ${{ jobs.get-matrix.outputs.matrix-samba }} | ||
matrix-webdav: | ||
value: ${{ jobs.get-matrix.outputs.matrix-webdav }} | ||
|
||
|
@@ -69,6 +71,7 @@ jobs: | |
matrix-hdfs: ${{ toJson(fromJson(steps.matrix-hdfs.outputs.result)[steps.key-hdfs.outputs.key]) }} | ||
matrix-s3: ${{ toJson(fromJson(steps.matrix-s3.outputs.result)[steps.key-s3.outputs.key]) }} | ||
matrix-sftp: ${{ toJson(fromJson(steps.matrix-sftp.outputs.result)[steps.key-sftp.outputs.key]) }} | ||
matrix-samba: ${{ toJson(fromJson(steps.matrix-samba.outputs.result)[steps.key-samba.outputs.key]) }} | ||
matrix-webdav: ${{ toJson(fromJson(steps.matrix-webdav.outputs.result)[steps.key-webdav.outputs.key]) }} | ||
steps: | ||
- name: Checkout code | ||
|
@@ -635,6 +638,36 @@ jobs: | |
with: | ||
cmd: yq -o=json '.matrix' .github/workflows/data/sftp/matrix.yml | ||
|
||
- name: Check if Samba files are changed | ||
id: changed-samba | ||
uses: tj-actions/changed-files@v35 | ||
with: | ||
files_from_source_file: .github/workflows/data/samba/tracked.txt | ||
files_ignore_from_source_file: .github/workflows/data/samba/ignored.txt | ||
|
||
- name: Print Samba files changed | ||
run: | | ||
echo '${{ steps.changed-samba.outputs.all_changed_files }}' | ||
- name: Calculate Samba matrix key | ||
id: key-samba | ||
run: | | ||
if ${{ inputs.nightly }}; then | ||
key=nightly | ||
elif ${{ steps.changed-base.outputs.any_changed }} || ${{ steps.changed-file.outputs.any_changed }} || ${{ steps.changed-samba.outputs.any_changed }}; then | ||
key=full | ||
else | ||
key=small | ||
fi | ||
echo key=$key | ||
echo key=$key >> $GITHUB_OUTPUT | ||
- name: Get Samba matrix | ||
id: matrix-samba | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: yq -o=json '.matrix' .github/workflows/data/samba/matrix.yml | ||
|
||
- name: Check if WebDAV files are changed | ||
id: changed-webdav | ||
uses: tj-actions/changed-files@v35 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Tests for Samba | ||
on: | ||
workflow_call: | ||
inputs: | ||
server-version: | ||
required: true | ||
type: string | ||
python-version: | ||
required: true | ||
type: string | ||
os: | ||
required: true | ||
type: string | ||
with-cache: | ||
required: false | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
test-samba: | ||
name: Run Samba tests (server=${{ inputs.server-version }}, python=${{ inputs.python-version }}, os=${{ inputs.os }}) | ||
runs-on: ${{ inputs.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
if: inputs.with-cache | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-python-${{ inputs.python-version }}-tests-samba-${{ hashFiles('requirements/core.txt', 'requirements/samba.txt', 'requirements/tests/base.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-python-${{ inputs.python-version }}-tests-samba-${{ hashFiles('requirements/core.txt', 'requirements/samba.txt', 'requirements/tests/base.txt') }} | ||
${{ runner.os }}-python-${{ inputs.python-version }}-tests-samba- | ||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip setuptools wheel | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -I -r requirements/core.txt -r requirements/samba.txt -r requirements/tests/base.txt | ||
# Replace with Github Actions' because of custom parameter for samba container start | ||
- name: Start Samba | ||
run: | | ||
docker compose down -v --remove-orphans | ||
docker compose up -d samba | ||
env: | ||
SAMBA_IMAGE: elswork/samba:${{ inputs.server-version }} | ||
COMPOSE_PROJECT_NAME: ${{ github.run_id }}-samba${{ inputs.server-version }} | ||
|
||
- name: Wait for Samba to be ready | ||
run: | | ||
./docker/wait-for-it.sh -h localhost -p 445 -t 60 | ||
- name: Run tests | ||
run: | | ||
mkdir reports/ || echo "Directory exists" | ||
sed '/^$/d' ./.env.local | sed '/^#/d' | sed 's/^/export /' > ./env | ||
source ./env | ||
./pytest_runner.sh -m samba | ||
- name: Shutdown Samba | ||
if: always() | ||
run: | | ||
docker compose down -v --remove-orphans | ||
env: | ||
COMPOSE_PROJECT_NAME: ${{ github.run_id }}-samba${{ inputs.server-version }} | ||
|
||
- name: Upload coverage results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: samba-${{ inputs.server-version }}-python-${{ inputs.python-version }}-os-${{ inputs.os }} | ||
path: reports/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ python: | |
- ftp | ||
- ftps | ||
- hdfs | ||
- samba | ||
- s3 | ||
- sftp | ||
- webdav | ||
|
Oops, something went wrong.