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: Update testghpkgs workflow to be able to run it again. #5754

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/testghpkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: pxt-testghpkgs

on:
workflow_dispatch:
inputs:
branch-or-commit:
description: Branch or commit to checkout for test
required: false
default: 'master'
Copy link
Collaborator Author

@microbit-carlos microbit-carlos Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've set the default to the main branch, the workflow has testing on stable3, so if needed we could change this to one of the stable branches.
However, since the form has to be triggered manually, I think it's probably fine to input that at the time it's triggered.


jobs:
build:
Expand All @@ -10,15 +15,14 @@ jobs:

strategy:
matrix:
node-version: [8.x]
branch: [stable3.0]
Comment on lines -13 to -14
Copy link
Collaborator Author

@microbit-carlos microbit-carlos Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than have the branch in the yaml file, I've added it as a workflow form input, so that it can be set to whatever it's needed at the point the workflow is manually triggered:
image

node-version: [16.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
ref: ${{ github.event.inputs.branch-or-commit }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
Expand All @@ -28,7 +32,7 @@ jobs:
- name: pxt buildtarget
run: pxt buildtarget
- name: cache build output
uses: actions/cache@v1
uses: actions/cache@v4
env:
cache-name: cache-testghpkgs
with:
Expand All @@ -43,10 +47,10 @@ jobs:
env:
PXT_FORCE_GITHUB_PROXY: 1
PXT_ACCESS_TOKEN: ${{ secrets.PXT_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: upload build log
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: logs-${{ matrix.branch }}
name: logs
path: temp/ghpkgs/*.txt
Loading