Skip to content

Commit 674a627

Browse files
author
gsnow
committed
Merge branch 'feat-r1b' into 'main'
Push feat-rb1 to main - pending release 0.3.x See merge request powershell/commitfusion!1
2 parents 5c69583 + e707b59 commit 674a627

File tree

115 files changed

+65974
-8446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+65974
-8446
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test Coveralls
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Replace with the main branch name if needed
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Node.js 16.x
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: '16.x'
21+
22+
- name: Install npm dependencies
23+
run: npm install
24+
25+
- name: Run tests and generate coverage report
26+
run: make test-coverage
27+
28+
- name: Upload coverage report to Coveralls
29+
env:
30+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
31+
run: |
32+
npm install -g coveralls
33+
coveralls
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2+
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
jobs:
25+
# Build job
26+
build:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v3
33+
- name: Build with Jekyll
34+
uses: actions/jekyll-build-pages@v1
35+
with:
36+
source: ./docs
37+
destination: ./_site
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v2
40+
41+
# Deployment job
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
test/
2-
dist/
2+
dist/
3+
docs/_site/
4+
CHANGELOG-Test.md

.gitlab-ci.yml

Lines changed: 148 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,161 @@
1-
# author: mnoxx @ proton me
2-
# date: Saturday, 24 September 2022 2:24:20 AM
3-
# version: v1.0
4-
# env: powershell(5.x), pwsh(7.x)
51
stages:
6-
- build # dependancies
7-
- pester # pester test script
8-
- test_pwsh # test powershell core latest
9-
- test_powershell # test powershell
10-
- deploy_psprivate # deploy to psgallary private instance
11-
- deploy_psgallary # deploy to psgallary
12-
build-job:
2+
- tests
3+
- build
4+
- deploylocal
5+
- deploy
6+
- release
7+
8+
pester_test:
9+
stage: tests
10+
tags:
11+
- windows
12+
script:
13+
- pwsh
14+
- install-module -name 'pester' -RequiredVersion '5.5.0' -Repository 'psgallery' -confirm:$false
15+
- Import-Module -name pester -RequiredVersion '5.5.0'
16+
- invoke-Pester -Script .\test\Test-Unit-Pester.ps1 -CI || exit 1
17+
18+
# Pester Test Stage
19+
pester_test_coverage:
20+
stage: tests
21+
tags:
22+
- windows
23+
script:
24+
- pwsh
25+
- install-module -name 'pester' -RequiredVersion '5.5.0' -Repository 'psgallery' -confirm:$false
26+
- Import-Module -name pester -RequiredVersion '5.5.0'
27+
- invoke-Pester -Script .\build\bt0-ci-test-pester.ps1 -CI || exit 1
28+
artifacts:
29+
paths:
30+
- ./coverage.xml
31+
32+
# Script Analyzer Test Stage
33+
script_analyzer:
34+
stage: tests
35+
tags:
36+
- windows
37+
script:
38+
- pwsh
39+
- find-module -name PSScriptAnalyzer -Repository PSGallery | install-module -Scope CurrentUser -Force -SkipPublisherCheck
40+
- Import-Module -Name PSScriptAnalyzer
41+
- .\build\bt1-p2-ci-test-pssa.ps1
42+
artifacts:
43+
paths:
44+
- ./coverage.xml
45+
46+
# Build Module Stage
47+
build_module:
1348
stage: build
49+
tags:
50+
- windows
51+
rules:
52+
- if: '$CI_BUILD_STAGE == "tests" && $CI_BUILD_STATUS == "success"'
53+
script:
54+
- pwsh
55+
- Find-Module -name 'psmpacker' -repository 'powershell' | install-Module -force
56+
- import-module -name 'psmpacker'
57+
- .\build\bt1-ci-build-module.ps1
58+
artifacts:
59+
paths:
60+
- ./dist/*
61+
- ./coverage.xml
62+
63+
# Create Nuget Package Stage
64+
create_nuget:
65+
stage: build
66+
tags:
67+
- windows
68+
rules:
69+
- if: '$CI_BUILD_STAGE == "tests" && $CI_BUILD_STATUS == "success"'
1470
script:
1571
- pwsh.exe
16-
- write-host -f green "template ci\cd config successfull"
17-
pester-job:
18-
stage: pester
72+
- find-Module -Repository 'powershell' -Name 'nupsforge' | Install-module -force
73+
- Import-Module -Name 'nupsforge' -force
74+
- .\build\bt2-ci-create-packages.ps1
75+
artifacts:
76+
paths:
77+
- ./dist/*
78+
- ./coverage.xml
79+
80+
# Deploy GitLab Package Stage
81+
deploy_gitlab:
82+
stage: deploylocal
83+
tags:
84+
- windows
1985
script:
2086
- pwsh.exe
21-
- write-host -f green "template ci\cd config successfull"
22-
test-pwsh-job:
23-
stage: test_pwsh
87+
- .\build\bt3-ci-deploy-pushtogitlab.ps1
88+
rules:
89+
- if: '$CI_BUILD_STAGE == "build" && $CI_BUILD_STATUS == "success"'
90+
artifacts:
91+
paths:
92+
- ./dist/*
93+
- ./coverage.xml
94+
95+
# Deploy Proget Packages Stage
96+
deploy_proget:
97+
stage: deploylocal
98+
tags:
99+
- windows
24100
script:
25101
- pwsh.exe
26-
- write-host -f green "template ci\cd config successfull"
27-
test-powershell-job:
28-
stage: test_powershell
102+
- .\build\bt4-ci-deploy-pushtoproget.ps1
103+
rules:
104+
- if: '$CI_BUILD_STAGE == "build" && $CI_BUILD_STATUS == "success"'
105+
artifacts:
106+
paths:
107+
- ./dist/*
108+
- ./coverage.xml
109+
110+
# Deploy Chocolatey Package Stage
111+
deploy_chocolatey:
112+
stage: deploy
113+
tags:
114+
- windows
29115
script:
30-
- powershell.exe
31-
- write-host -f green "template ci\cd config successfull"
32-
psgallary-deploy-job:
33-
stage: deploy_psgallary
116+
- pwsh.exe
117+
- .\build\BT5-CI-deploy-PushToChoco.ps1
118+
rules:
119+
- if: '$CI_COMMIT_BRANCH == "main" && $CI_BUILD_STAGE == "deploylocal" && $CI_BUILD_STATUS == "success"'
120+
artifacts:
121+
paths:
122+
- ./dist/*
123+
- ./coverage.xml
124+
125+
# Deploy PSGallary Package Stage
126+
deploy_psgallary:
127+
stage: deploy
128+
tags:
129+
- windows
34130
script:
35131
- pwsh.exe
36-
psprivate-deploy-job:
37-
stage: deploy_psprivate
132+
- .\build\bt6-ci-deploy-psgallary.ps1
133+
rules:
134+
- if: '$CI_COMMIT_BRANCH == "main" && $CI_BUILD_STAGE == "deploylocal" && $CI_BUILD_STATUS == "success"'
135+
136+
# Create Release Stage
137+
create_release:
138+
stage: release
139+
tags:
140+
- windows
141+
script:
142+
- pwsh.exe
143+
- Compress-Archive -Path .\ -DestinationPath Build.gz
144+
rules:
145+
- if: '$CI_COMMIT_BRANCH == "main" && $CI_BUILD_STAGE == "deploy" && $CI_BUILD_STATUS == "success"'
146+
artifacts:
147+
paths:
148+
- Build.gz
149+
- ./dist/*
150+
151+
# Deploy Coverage to Coverails.io Stage
152+
deploy_coverage:
153+
stage: release
154+
tags:
155+
- windows
38156
script:
39157
- pwsh.exe
40-
- write-host -f green "template ci\cd config successfull"
41-
#include:
42-
# - template: auto-devops.gitlab-ci.yml
158+
- .\bt8-ci-deploy-coveralls-report.ps1
159+
rules:
160+
- if: '$CI_COMMIT_BRANCH == "main" && $CI_BUILD_STAGE == "deploy" && $CI_BUILD_STATUS == "success"'
161+

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/CommitFusion.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)