Migration from Dzej's PC in dec 2024 & integration tests +- fixed #222
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
name: Windows | |
on: | |
push: | |
branches: [ "devel", "testing", "stable", "LTS" ] | |
paths: | |
- '*.ps1' | |
- 'CommonInitScripts/**.ps1' | |
- 'Windows_1X/**.ps1' | |
- '.github/workflows/windows.yml' | |
pull_request: | |
branches: [ "devel", "testing", "stable", "LTS" ] | |
jobs: | |
build: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
# TODO add this to Linux CI tests as well (once it is well tested) | |
if: | | |
!endsWith(github.event.head_commit.message, 'Add a TODO') && | |
!endsWith(github.event.head_commit.message, 'Add TODOs') && | |
!endsWith(github.event.head_commit.message, 'Remove a completed TODO') | |
strategy: | |
matrix: | |
os: ["windows-latest"] # TODO_YEARLY - consider adding legacy Win versions | |
steps: | |
- name: "checkout repo" | |
uses: actions/checkout@v4 | |
- name: Install winget | |
uses: Cyberboss/install-winget@v1 | |
- name: "Test `winget` installation" | |
shell: pwsh | |
run: winget | |
- name: "Run `packages_install.ps1` separately (so that it does not pollute logs)" | |
shell: pwsh | |
run: .\Windows_1X\packages_install.ps1 | |
- name: "Run `run_all.ps1`" | |
shell: pwsh | |
run: .\Windows_1X\run_all.ps1 | |
- name: Install optional packages | |
shell: pwsh | |
run: .\Windows_1X\optional_packages_install.ps1 | |
- name: Create a directory for temporary files | |
shell: pwsh | |
run: mkdir C:/tmp | |
# TODO IDEMPOTENCE TEST | |
# - name: save C:/Users for idempotency test | |
# run: cp -Recurse C:/Users C:/tmp # TODO this will currently fails with: | |
# 2 | cp -Recurse C:/Users C:/tmp | |
# | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
# | Access to the path 'C:\Users\All Users\Application Data' is denied. | |
- name: "Running `run_all.ps1` script for the 2nd time should not fail." | |
shell: pwsh | |
run: .\Windows_1X\run_all.ps1 | |
- name: Running `optional_packages_install.ps1` script for the 2nd time should not fail. | |
shell: pwsh | |
run: .\Windows_1X\optional_packages_install.ps1 | |
# - name: "The `run_all.ps1` script should be idempotent on C:/Users directory (WIP - needs testing)" | |
# TODO finish the idempotence test |