Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support: issues with publishing 2 different reports in the same action run #1111

Closed
3 tasks done
4c74356b41 opened this issue Nov 18, 2024 · 2 comments
Closed
3 tasks done
Assignees
Labels
support User support

Comments

@4c74356b41
Copy link

4c74356b41 commented Nov 18, 2024

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

I have a test suite that must be run on 2 different runners. public and private. hence i cant have a single allure report file. first the private part runs (it creates a bunch of resources in Azure) and after that the public part runs (it relies on resources being created by the private part). private part runs this action just fine and I can see the reports. However the public part reports are always blank. Action produces no errors except for errors deleting files.

Relevant links

Public repository: repo is private
YAML config: ?
YAML workflow:

name: e2e nightly tests
permissions:
  contents: write

jobs:
  private:
    runs-on: xyz
    steps:
    - redacted
    - name: run private tests
      run: python3 -m pytest ./_tests -m private --alluredir allure-results --color=no -s
    - name: checkout allure branch
      uses: actions/checkout@v4
      if: always()
      continue-on-error: true
      with:
        ref: gh-pages
        path: gh-pages
    - name: generate allure reports
      uses: simple-elf/allure-report-action@master
      if: always()
      id: allure-report
      with:
        github_run_num: ${{ github.run_number }}-private
        # these are all defaults
        gh_pages: gh-pages
        allure_results: allure-results
        allure_report: allure-report
        allure_history: allure-history
    - name: deploy allure reports
      if: always()
      uses: peaceiris/actions-gh-pages@v4.0.0
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: allure-history

  public:
    runs-on: ubuntu-latest
    needs:
    - private
    steps:
    - redacted
    - name: run public tests
      run: pytest -m public --alluredir allure-results --color=no --suppress-no-test-exit-code -s
    - name: checkout allure branch
      uses: actions/checkout@v4
      if: always()
      continue-on-error: true
      with:
        ref: gh-pages
        path: gh-pages
    - name: generate allure reports
      uses: simple-elf/allure-report-action@v1.11
      if: always()
      id: allure-report
      with:
        github_run_num: ${{ github.run_number }}-public
        # these are all defaults
        gh_pages: gh-pages
        allure_results: allure-results
        allure_report: allure-report
        allure_history: allure-history
    - name: deploy allure reports
      if: always()
      uses: peaceiris/actions-gh-pages@v4.0.0
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
        publish_dir: allure-history
        keep_files: true

using github_run_num: ${{ github.run_number }}-private and github_run_num: ${{ github.run_number }}-public so that the reports do not collide

Relevant log output

the only errors are get are during this step: Prepare publishing assets
where it tries to delete a bunch of stuff and fails for some of it.

  [INFO] ForceOrphan: false
  /usr/bin/git clone --depth=1 --single-branch --branch gh-pages ***github.com/xyz/abc.git /home/runner/actions_github_pages_ghj
  Cloning into '/home/runner/actions_github_pages_ghj'...
  [INFO] Keep existing files
  [INFO] chdir /home/runner/actions_github_pages_ghj
  [INFO] prepare publishing assets
  [INFO] delete /home/runner/work/abc/abc/allure-history/.git
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/FETCH_HEAD
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/HEAD
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/branches
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/config
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/config.worktree
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/description
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/applypatch-msg.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/commit-msg.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/fsmonitor-watchman.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/post-update.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/pre-applypatch.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/pre-commit.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/pre-merge-commit.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/pre-push.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/pre-rebase.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/pre-receive.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/prepare-commit-msg.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/push-to-checkout.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/sendemail-validate.sample
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks/update.sample
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/hooks
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/index
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/info/exclude
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/info
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs/HEAD
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs/refs/heads/gh-pages
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs/refs/heads
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs/refs/remotes/origin/gh-pages
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs/refs/remotes/origin
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs/refs/remotes
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs/refs
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/logs
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/objects/info
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/objects/pack/pack-b834c39c2f842ad84ccab4ceae85a69557b3caa8.idx
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/objects/pack/pack-b834c39c2f842ad84ccab4ceae85a69557b3caa8.pack
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/objects/pack/pack-b834c39c2f842ad84ccab4ceae85a69557b3caa8.rev
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/objects/pack
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/objects
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/refs/heads/gh-pages
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/refs/heads
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/refs/remotes/origin/gh-pages
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/refs/remotes/origin
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/refs/remotes
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/refs/tags
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git/refs
  rm: could not remove file (code EACCES): /home/runner/work/abc/abc/allure-history/.git/shallow
  rm: could not remove directory (code EACCES): /home/runner/work/abc/abc/allure-history/.git
  [INFO] copy /home/runner/work/abc/abc/allure-history to /home/runner/actions_github_pages_ghj
  cp: copyFileSync: could not write to dest file (code=EACCES):/home/runner/actions_github_pages_ghj/.git/objects/pack/pack-b834c39c2f842ad84ccab4ceae85a69557b3caa8.idx
  [INFO] delete excluded assets
  cp: cannot create directory '/home/runner/actions_github_pages_ghj': No such file or directory
@4c74356b41 4c74356b41 added the support User support label Nov 18, 2024
@4c74356b41
Copy link
Author

oddly enough - if I do not publish the private reports, public ones do not work as well. double u, tee, ef

@4c74356b41
Copy link
Author

okay, apparently generate allure reports action doesnt warn you when theres nothing to generate. so basically it was trying to get reports from a wrong path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User support
Projects
None yet
Development

No branches or pull requests

2 participants