From 96e8939def004429f69f863c53736455bfe3bcc4 Mon Sep 17 00:00:00 2001 From: Hang Cui Date: Fri, 17 Oct 2025 15:40:06 -0700 Subject: [PATCH] Update repo --- .gitea/workflows/006_passing_files.yaml | 57 ++++++------------------- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/.gitea/workflows/006_passing_files.yaml b/.gitea/workflows/006_passing_files.yaml index 8db5296..387ac87 100644 --- a/.gitea/workflows/006_passing_files.yaml +++ b/.gitea/workflows/006_passing_files.yaml @@ -1,53 +1,20 @@ -name: Passing Files In Artifacts +name: Upload Artifact Example + +on: [push] -on: - workflow_dispatch: - jobs: - unit-tests: - runs-on: ubuntu-22.04 + build-and-upload: + runs-on: ubuntu-latest steps: - - name: Checkout source code - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v3 - - 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: Stage coverage into RUNNER_TEMP - run: | - echo "RUNNER_TEMP=${RUNNER_TEMP}" - mkdir -p "${RUNNER_TEMP}/cov" - cp "${{ github.workspace }}/backend/.coverage" "${RUNNER_TEMP}/cov/.coverage" - ls -la "${RUNNER_TEMP}/cov" - stat "${RUNNER_TEMP}/cov/.coverage" + - name: Create an artifact + run: echo "This is my artifact content." > my_artifact.txt - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: coverage - path: ${RUNNER_TEMP}/cov/.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: coverage - path: ${{ github.workspace }} # Move the coverage to ${{ github.workspace }} - - - name: List folder - run: ls -la ${{ github.workspace }} + name: my-build-artifact + path: my_artifact.txt + retention-days: 5 # Optional: Set the retention period for the artifact \ No newline at end of file