Update repo
This commit is contained in:
45
.gitea/workflows/007_passing_artifact.yaml
Normal file
45
.gitea/workflows/007_passing_artifact.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Passing Files In Artifacts
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python 3.10.12 # Setup Python inside the runner
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10.12'
|
||||
|
||||
- name: Install tox # Tool used for Python unit tests
|
||||
run: pip install tox
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
cd backend
|
||||
COVERAGE_FILE=.coverage tox -e unit
|
||||
ls -la ${{ github.workspace }}/backend
|
||||
stat ./.coverage
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-coverage
|
||||
path: ${{ github.workspace }}/backend/.coverage
|
||||
if-no-files-found: error
|
||||
|
||||
load-file-example:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: [unit-tests]
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build-coverage
|
||||
path: ${{ github.workspace }} # Move the coverage to ${{ github.workspace }}
|
||||
|
||||
- name: List folder
|
||||
run: ls -la ${{ github.workspace }}
|
||||
Reference in New Issue
Block a user