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

CI: Install random 💯 #1278

Merged
merged 3 commits into from
Jan 13, 2025
Merged

CI: Install random 💯 #1278

merged 3 commits into from
Jan 13, 2025

Conversation

zen0bit
Copy link
Contributor

@zen0bit zen0bit commented Jan 13, 2025

Updated, old CIs deleted..

Now generate list of tested files (tested.list) saved in repository
Current timeout limit for installing apps is set to 10 minutes

Will run on pushes, pull requests, shedule or manually
on main branch only
Set it like you desire..

Any suggestions, wishes for change?

@zen0bit zen0bit force-pushed the ci branch 2 times, most recently from b6cd731 to e5a138c Compare January 13, 2025 05:10
@zen0bit
Copy link
Contributor Author

zen0bit commented Jan 13, 2025

Looks like: run

If we don't want to improve testing somehow
(check for desktop file, run AppImage --help, etc. idk)
Or bit of polishing...

It's done
PS: forgotten delete artifacts even if some app test fails

@zen0bit zen0bit force-pushed the ci branch 2 times, most recently from 0b601e3 to e94599e Compare January 13, 2025 05:27
@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

I'd like it checks what it installs (launchers or none, binaries, symlinks, directories...), if this runs only when apps are added in /programs/x86_64

Only on pull requests or when scripts have been added/updated under /programs/x86_64

No action when other parts are touched (APP-MANAGER, modules or documentation)

@zen0bit can you do that?

@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

Looks like: run

This made me discover an error in the script of unityhub from the latest commit (6 months ago) where the download reference was changed... and also discoveded that on their official site they have no more an AppImage. Only a deb package. Just removed. Thanks for this.

This feature is really important.

@zen0bit
Copy link
Contributor Author

zen0bit commented Jan 13, 2025

I'd like it checks what it installs (launchers or none, binaries, symlinks, directories...), if this runs only when apps are added in /programs/x86_64

Only on pull requests or when scripts have been added/updated under /programs/x86_64

No action when other parts are touched (APP-MANAGER, modules or documentation)

@zen0bit can you do that?

which branch?

@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

which branch?

main, is the one where its easier people do pull requests for applications

@zen0bit
Copy link
Contributor Author

zen0bit commented Jan 13, 2025

explain

I'd like it checks what it installs (launchers or none, binaries, symlinks, directories

@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

explain

I'd like it checks what it installs (launchers or none, binaries, symlinks, directories

  • in /opt/$APP what is installed
  • in /usr/local/bin what is installed
  • if in /usr/local/share/applications is installed an $APP-AM.desktop file

@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

  • in /opt/$APP what is installed

I think you can use ls

  • in /usr/local/bin what is installed

maybe you can use command -v

  • if in /usr/local/share/applications is installed an $APP-AM.desktop file

you can use test -f

@zen0bit
Copy link
Contributor Author

zen0bit commented Jan 13, 2025

can you write tests in bash, what you want...

      - name: "test ${{ matrix.file }} 🚧"
        run: |
          mkdir -p results
          if timeout "$TIMEOUT"m am -i "${{ matrix.file }}"; then
            am -R "${{ matrix.file }}" && echo "${{ matrix.file }}" > results/results-${{ matrix.file }}
          else
            if [[ $? -eq 124 ]]; then
              echo "### :boom: Timeout $TIMEOUT minutes reached ${{ matrix.file }}!" >> $GITHUB_STEP_SUMMARY
            else
              echo "### :skull: FAIL: ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY
            fi
            exit 1
          fi

@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

Maybe this?

      - name: "test ${{ matrix.file }} 🚧"
        run: |
          echo ""
          echo " Structure of the directory ${{ matrix.file }}"
          echo ""
          ls /opt/"${{ matrix.file }}"
          echo ""
          echo "-------------------------------------------------------------"
          echo ""
          echo " Command in \$PATH"
          echo ""
          command -v "${{ matrix.file }}"
          echo ""
          echo "-------------------------------------------------------------"
          echo ""
          echo " Launchers in /usr/local/share/applications"
          echo ""
          ls /usr/local/share/applications
          echo ""
          echo "-------------------------------------------------------------"
          mkdir -p results
          if timeout "$TIMEOUT"m am -i "${{ matrix.file }}"; then
            am -R "${{ matrix.file }}" && echo "${{ matrix.file }}" > results/results-${{ matrix.file }}
          else
            if [[ $? -eq 124 ]]; then
              echo "### :boom: Timeout $TIMEOUT minutes reached ${{ matrix.file }}!" >> $GITHUB_STEP_SUMMARY
            else
              echo "### :skull: FAIL: ${{ matrix.file }}" >> $GITHUB_STEP_SUMMARY
            fi
            exit 1
          fi

I used echo here, but you can use printf if you prefer

@zen0bit
Copy link
Contributor Author

zen0bit commented Jan 13, 2025

Included your tests...

on PRs will not work properly yet, but will work after you merge PR to main ;)

PS: unpacking appimage will be overkill?

PPS: trying new tests some fails

@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

PS: unpacking appimage will be overkill?

???

PPS: trying new tests some fails

page not found

@ivan-hc ivan-hc changed the base branch from main to dev January 13, 2025 13:08
@ivan-hc
Copy link
Owner

ivan-hc commented Jan 13, 2025

let me test this on dev first

@ivan-hc ivan-hc merged commit b13de00 into ivan-hc:dev Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants