|
69 | 69 | ${{ matrix.set_codepage }} |
70 | 70 | ${{ matrix.set_display }} |
71 | 71 | ${{ env.ATEST_PYTHON }} atest/run.py --interpreter ${{ env.BASE_PYTHON }} --exclude no-ci ${{ matrix.atest_args }} atest/robot |
72 | | -
|
73 | | - - name: Archive acceptances test results |
74 | | - uses: actions/upload-artifact@v4 |
75 | | - with: |
76 | | - name: at-results-${{ matrix.python-version }}-${{ matrix.os }} |
77 | | - path: atest/results |
78 | | - if: always() && job.status == 'failure' |
79 | | - |
80 | | - - name: Install and run rflogs |
81 | | - if: failure() |
82 | | - env: |
83 | | - RFLOGS_API_KEY: ${{ secrets.RFLOGS_API_KEY }} |
84 | | - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} |
85 | | - working-directory: atest/results |
86 | | - shell: python |
87 | | - run: | |
88 | | - import os |
89 | | - import glob |
90 | | - import subprocess |
91 | | -
|
92 | | - # Install rflogs |
93 | | - subprocess.check_call(["pip", "install", "rflogs"]) |
94 | | -
|
95 | | - # Find the first directory containing log.html |
96 | | - log_files = glob.glob("**/log.html", recursive=True) |
97 | | - if log_files: |
98 | | - result_dir = os.path.dirname(log_files[0]) |
99 | | - print(f"Result directory: {result_dir}") |
100 | | -
|
101 | | - # Construct the rflogs command |
102 | | - cmd = [ |
103 | | - "rflogs", "upload", |
104 | | - "--tag", f"workflow:${{ github.workflow }}", |
105 | | - "--tag", f"os:${{ runner.os }}", |
106 | | - "--tag", f"python-version:${{ matrix.python-version }}", |
107 | | - "--tag", f"branch:{os.environ['BRANCH_NAME']}", |
108 | | - result_dir |
109 | | - ] |
110 | | -
|
111 | | - # Run rflogs upload |
112 | | - subprocess.check_call(cmd) |
113 | | - else: |
114 | | - print("No directory containing log.html found") |
115 | | - exit(1) |
0 commit comments