Skip to content

Commit

Permalink
ci: Run installation check for all provided versions of codemeter-lite
Browse files Browse the repository at this point in the history
  • Loading branch information
AiyionPrime committed Sep 5, 2024
1 parent dd9081a commit f47ed4d
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/ci_ubuntu_verify_installation.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
name: CI ubuntu verify installation
name: CI ubuntu verify installation
'on':
workflow_call: null
jobs:
fetch_installations:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Provide the repo locally via http
run: nohup python3 -m http.server 8080 &
working-directory: ./ubuntu/
- name: Install maintainer publickey
run: curl -s --compressed http://localhost:8080/burfeind_jan-niklas.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/burfeind_jan-niklas.gpg
- name: Add local repo to APT sources
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/burfeind_jan-niklas.gpg] http://localhost:8080 ./" | sudo tee /etc/apt/sources.list.d/localrepo.list
- name: update apt
run: sudo apt-get update
- name: Get available versions of c-lite
id: get_versions
run: |
apt-cache madison codemeter-lite | grep "http://localhost:8080" | awk '{print $3}' > versions.txt
cat versions.txt
- name: Kill the webserver again
run: sudo pkill python3
- name: Extract lines from versions.txt
id: extract-versions
run: |
versions=$(cat versions.txt | jq -R -s -c 'split("\n") | map(select(. != ""))')
echo "cm_versions=$versions" >> $GITHUB_STATE
package_is_installable:
runs-on: ubuntu-latest
needs: fetch_installations
strategy:
matrix:
version: ${{ fromJson(needs.generate_versions.outputs.cm_versions) }}
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
Expand All @@ -16,8 +46,8 @@ jobs:
run: echo "deb [signed-by=/etc/apt/trusted.gpg.d/burfeind_jan-niklas.gpg] http://localhost:8080 ./" | sudo tee /etc/apt/sources.list.d/localrepo.list
- name: Update apt
run: sudo apt-get update
- name: Install codemeter-lite
run: sudo apt-get install -y codemeter-lite
- name: Install codemeter-lite in version ${{ matrix.version }}
run: sudo apt-get install -y codemeter-lite=${{ matrix.version }}
- name: Kill the webserver again
run: sudo pkill python3
- name: Codemeter is running
Expand Down

0 comments on commit f47ed4d

Please sign in to comment.