forked from Sensing-Dev/sensing-dev-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: add testing workflow for each PR
- Loading branch information
1 parent
46f0c02
commit b13a6b4
Showing
3 changed files
with
65 additions
and
165 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
on: | ||
push: | ||
branches-ignore: | ||
- main # This will run the build and test jobs for every push on all branches except for dev to main | ||
|
||
pull_request: | ||
branches: | ||
- '*' # This will run the build and test jobs for pull requests to all branches | ||
|
||
|
||
jobs: | ||
generate_config: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.11.4" | ||
|
||
- name: Create and enter the build directory | ||
run: | | ||
cd installer | ||
mkdir build && cd build | ||
python -m pip install --upgrade pip | ||
pip install -r ${{ github.workspace }}/installer/src/requirements.txt | ||
python ${{ github.workspace }}/installer/src/generate_config.py -p Windows | ||
- name: Upload a Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: install-test-for-windows | ||
path: | | ||
${{ github.workspace }}/build/config_Windows.json | ||
${{ github.workspace }}/installer/tools/installer.ps1 | ||
test_installation: | ||
runs-on: ${{ matrix.os }} | ||
needs: generate_config | ||
permissions: | ||
id-token: write | ||
strategy: | ||
matrix: | ||
os: [windows-2019] | ||
install_option : ["-version v24.05.06", "-configPath config_Windows.json"] | ||
|
||
steps: | ||
|
||
- name: Download All Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: install-test-for-windows | ||
path: download | ||
|
||
- name: Unzip Artifacts | ||
run: | | ||
Expand-Archive -Path '${{ github.workspace }}/download/install-test-for-windows.zip' -DestinationPath '${{ github.workspace }}/items' | ||
- name: Install with the script from Artifacts | ||
run: | | ||
cd ${{ github.workspace }}/items | ||
powershell.exe -ExecutionPolicy Bypass -File .\installer.ps1 ${{ matrix.install_option }} |
This file was deleted.
Oops, something went wrong.