Fix #110
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
name: Run automated tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- support/** | |
types: [opened, synchronize] | |
paths-ignore: | |
- '**/*.md' | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
permissions: write-all | |
jobs: | |
run_system_tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 500 | |
steps: | |
- name: Get the current date | |
id: date | |
shell: bash | |
run: echo "::set-output name=timestamp::$(date +%s)" | |
- name: Set url prefix | |
shell: bash | |
env: | |
TIMESTAMP: ${{ steps.date.outputs.timestamp }} | |
run: | | |
echo "URL_PREFIX=${{ github.run_number }}-$TIMESTAMP" >> $GITHUB_ENV | |
- name: Set attributes | |
shell: bash | |
env: | |
TIMESTAMP: ${{ steps.date.outputs.timestamp }} | |
run: | | |
echo "NEOFS_ATTRIBUTES=RunNumber=${{ github.run_number }}-$TIMESTAMP,Type=action_test_files" >> $GITHUB_ENV | |
- name: Checkout gh-push-to-neofs | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.6' | |
- run: python --version | |
- name: Run gh-push-to-neofs | |
id: gh_push_to_neofs | |
uses: ./ | |
with: | |
NEOFS_WALLET: ${{ secrets.NEOFS_WALLET }} | |
NEOFS_WALLET_PASSWORD: ${{ secrets.NEOFS_WALLET_PASSWORD }} | |
NEOFS_NETWORK_DOMAIN: ${{ vars.NEOFS_NETWORK_DOMAIN }} | |
NEOFS_HTTP_GATE: ${{ vars.NEOFS_HTTP_GATE }} | |
STORE_OBJECTS_CID: ${{ vars.STORE_OBJECTS_CID }} | |
EXPIRATION_PERIOD: ${{ vars.EXPIRATION_PERIOD }} | |
PATH_TO_FILES_DIR: './tests/data' | |
NEOFS_ATTRIBUTES: ${{ env.NEOFS_ATTRIBUTES }} | |
URL_PREFIX: ${{ env.URL_PREFIX }} | |
- name: Prepare venv | |
shell: bash | |
id: prepare_venv | |
run: | | |
python3 -m venv venv | |
source venv/bin/activate && pip install -r requirements.txt | |
working-directory: ./tests | |
- name: Run tests | |
env: | |
OUTPUT_CONTAINER_URL: ${{ steps.gh_push_to_neofs.outputs.OUTPUT_CONTAINER_URL }} | |
run: | | |
source venv/bin/activate && pytest test_downloads.py --base_url="$OUTPUT_CONTAINER_URL" | |
working-directory: ./tests |