Skip to content

Upgrade all Actions running on Node12 to Node16#12

Closed
g-galante wants to merge 3 commits into
opentap:mainfrom
g-galante:11-upgrade-all-actions-to-node16
Closed

Upgrade all Actions running on Node12 to Node16#12
g-galante wants to merge 3 commits into
opentap:mainfrom
g-galante:11-upgrade-all-actions-to-node16

Conversation

@g-galante

@g-galante g-galante commented Nov 21, 2023

Copy link
Copy Markdown

Resolves #11

Commit c25e10e updates the OpenTAP version to 9.19.0 to prevent the test-macos-packages job from failing:
Screenshot from 2023-11-21 16-22-47

The issue is due to the immature OpenTAP 9.17.0 package resolver that is tricked by the Runner package dependency on OpenTAP 9.22.1:
Screenshot from 2023-11-21 16-48-21

to try and fetch it, even if the maximum available on the repository for MacOS x64 is 9.21.1:

Screenshot from 2023-11-21 16-52-13

Commit c66d8bc prevents the test-user-token job from failing:
Screenshot from 2023-11-21 16-24-03
if ${{ secrets.OPENTAP_USERTOKEN }} is not defined, e.g., in forked repos.

@alnlarsen

Copy link
Copy Markdown
Collaborator

Thanks @g-galante. Sorry, we haven't monitored this repository. I have created an alternate PR upgrading to node 20 and checkout@v4 instead:

#15

@g-galante

Copy link
Copy Markdown
Author

@alnlarsen Never mind. I'll close both this PR and the (linked) issue #11.

I see that, in the meantime, you implemented in commit 758da31 the change I proposed in commit c25e10e.

The test-user-token job still fails if ${{ secrets.OPENTAP_USERTOKEN }} is not defined, e.g., in forked repos. Similarly, the newly added test-additional-user-token fails if ${{ secrets.KS8500_REPO_TOKEN }} is not defined.

This could be easily fixed by:

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 10e0249..8be821b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -60,11 +60,14 @@ jobs:
 
   test-user-token:
     runs-on: ubuntu-20.04
+    env:
+      OPENTAP_USERTOKEN: ${{ secrets.OPENTAP_USERTOKEN }}
     name: Test Installing Private Packages
     steps:
       - name: Checkout
         uses: actions/checkout@v4
       - uses: ./ # Uses an action in the root directory
+        if: ${{ env.OPENTAP_USERTOKEN != '' }}
         id: setup
         with:
           version: '9.22.0-beta.1'
@@ -74,11 +77,14 @@ jobs:
 
   test-additional-user-token:
     runs-on: ubuntu-20.04
+    env:
+      OPENTAP_USERTOKEN: ${{ secrets.secrets.KS8500_REPO_TOKEN }}
     name: Test Installing Private Packages 2
     steps:
       - name: Checkout
         uses: actions/checkout@v4
       - uses: ./ # Uses an action in the root directory
+        if: ${{ env.secrets.KS8500_REPO_TOKEN != '' }}
         id: setup
         with:
           version: 9.23.0

as suggested above in commit c66d8bc. Let me know if you are interested in a PR.

What about PR opentap/get-gitversion#5? If you are interested I may update it.

After that, it would be useful to update the main opentap/opentap project to remove the warnings. Again, if you are interested, I can volunteer to submit a PR to fix that.

@g-galante g-galante closed this Feb 6, 2024
@g-galante g-galante deleted the 11-upgrade-all-actions-to-node16 branch February 6, 2024 10:10
@alnlarsen

Copy link
Copy Markdown
Collaborator

Thanks, @g-galante

I commented in the PR you linked.

If you open a new PR with the user token fixes for forks I will happily merge it. I have created an issue to reflect the issue: #16

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.

Upgrade all Actions running on Node12 to Node16

2 participants