Skip to content

npm(deps-dev): bump eslint-plugin-jest from 28.8.3 to 28.10.0 #1471

npm(deps-dev): bump eslint-plugin-jest from 28.8.3 to 28.10.0

npm(deps-dev): bump eslint-plugin-jest from 28.8.3 to 28.10.0 #1471

Workflow file for this run

on:
push: {}
workflow_dispatch:
inputs:
environment:
type: environment
default: production
name: test-upload
jobs:
test-upload-multiple-files:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'production' }}
name: A job that pushes a lot of files on artifacts
steps:
- uses: actions/checkout@v3
- name: create multiple files
run: mkdir -p test-files && for i in {1..2000}; do dd if=/dev/random of=test-files/$i.txt count=1 bs=1M; done
- name: Push all files
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: ./test-files
method: upload
test-upload-multiple-files-container:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'production' }}
container: ubuntu
name: Upload multiple files inside from a container job
steps:
- uses: actions/checkout@v3
- name: create multiple files
run: mkdir -p test-files && for i in {1..2000}; do dd if=/dev/random of=test-files/$i.txt count=1 bs=1M; done
shell: bash
- name: Push all files
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: ./test-files
method: upload
test-upload-big-file:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'production' }}
name: A job that push a big file on artifacts
steps:
- uses: actions/checkout@v3
- name: create one big file
run: dd if=/dev/random of=big_file.txt count=1024 bs=1M
- name: Push on big file
id: artifacts-upload
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: ./big_file.txt
method: upload
- name: Download file
run: curl -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }} --silent --fail --show-error --max-time 3600 ${{ steps.artifacts-upload.outputs.link }}/big_file.txt > upload_big_file.txt
- name: Compare files
run: cmp --silent upload_big_file.txt ./big_file.txt
push-artifacts-action:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'production' }}
name: A job that push single files on artifacts
needs: [test-upload-big-file, test-upload-multiple-files]
steps:
- uses: actions/checkout@v3
- id: artifacts-upload
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: action.yaml
method: upload
- uses: ./
with:
method: upload
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: README.md
- name: Download file
run: curl -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }} --silent --fail --show-error --max-time 3600 ${{ steps.artifacts-upload.outputs.link }}/README.md > upload_README.md
- name: Compare files
run: cmp --silent upload_README.md ./README.md
- name: Download file with artifacts-link
run: curl -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }} --silent --fail --show-error --max-time 3600 ${{ steps.artifacts-upload.outputs.link }}/action.yaml > upload_action.yaml
- name: Download file with redirect-link
run: curl -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }} -L --silent --fail --show-error --max-time 3600 ${{ steps.artifacts-upload.outputs.redirect-link }}/action.yaml > redirect-link.yaml
- name: Download with artifacts-url and artifacts-name
run: curl -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }} --silent --fail --show-error --max-time 3600 ${{ vars.ARTIFACTS_URL }}/builds/${{ steps.artifacts-upload.outputs.name }}/action.yaml > name_action.yaml
- run: NUMBER_OF_FILES=$(curl -u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }} --silent --fail --show-error --max-time 3600 ${{ vars.ARTIFACTS_URL }}/download/${{ steps.artifacts-upload.outputs.name }}/?format=text)
- name: Verify number of files
run: $([[ $NUMBER_OF_FILES -le 103 ]])
- name: Compare files
run: cmp --silent upload_action.yaml ./name_action.yaml
- name: Compare files2
run: cmp --silent upload_action.yaml ./action.yaml
- name: Compare redirect link downloaded file
run: cmp --silent redirect-link.yaml action.yaml
test-empty-folder:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'production' }}
name: A job that try to push an empty folder
steps:
- uses: actions/checkout@v3
- run: mkdir -p artifacts
- name: Push all files
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: ./artifacts
method: upload