Skip to content

Commit 6496893

Browse files
authored
Merge pull request #101 from Stepami/master
release v2.0.0 +semver:skip
2 parents 9c83de8 + 70a7e42 commit 6496893

File tree

381 files changed

+7650
-6306
lines changed

Some content is hidden

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

381 files changed

+7650
-6306
lines changed

.github/workflows/cla.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/develop.yml

Lines changed: 54 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,89 @@ name: Develop Workflow
22

33
on:
44
push:
5-
branches:
6-
- '**'
7-
pull_request:
8-
branches:
9-
- '**'
5+
branches-ignore:
6+
- 'release'
7+
pull_request_target:
8+
branches-ignore:
9+
- 'release'
10+
11+
permissions:
12+
actions: write
13+
checks: write
14+
contents: write
15+
issues: write
16+
pull-requests: write
1017

1118
jobs:
1219
build-and-test:
1320
name: Build & Test
14-
runs-on: ubuntu-latest
21+
runs-on: windows-latest
1522
steps:
1623
- name: Checkout
17-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
1827
- name: Setup .NET
19-
uses: actions/setup-dotnet@v2
28+
uses: actions/setup-dotnet@v4
2029
with:
21-
dotnet-version: 7.0.x
22-
- name: Cache NuGet packages
23-
uses: actions/cache@v3
30+
dotnet-version: 8.0.x
31+
- name: Setup GitVersion
32+
uses: gittools/actions/gitversion/setup@v3.0.0
2433
with:
25-
path: ~/.nuget/packages
26-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj*') }}
34+
versionSpec: '5.12.0'
35+
- name: Determine Version
36+
id: version_step
37+
uses: gittools/actions/gitversion/[email protected]
38+
with:
39+
useConfigFile: true
40+
- name: Push New Version Tag
41+
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
42+
run: |
43+
$gv = 'v${{ steps.version_step.outputs.majorMinorPatch }}' #gitversion result
44+
$lt = $( git describe --tags --abbrev=0 ) # last tag version result
45+
if ( -Not ( $gv -eq $lt ) )
46+
{
47+
git tag $gv
48+
git push origin --tags
49+
}
2750
- name: Restore dependencies
2851
run: dotnet restore
2952
- name: Build
30-
run: dotnet build --no-restore -c Release -v n
31-
- name: Test
53+
run: dotnet build /p:Version=${{ steps.version_step.outputs.fullSemVer }} --no-restore -c Release -v n
54+
- name: Unit Tests
3255
run: |
33-
dotnet test -c Release --no-build -v n --filter="Category=Unit"
56+
dotnet test -c Release ./tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests.csproj --no-build -v n
57+
dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-build -v n --filter="Category=Unit"
3458
mkdir coverage-report
3559
- name: Code Coverage Summary Report For Merge Request
36-
if: github.event_name == 'pull_request'
60+
if: github.event_name == 'pull_request_target'
3761
uses: 5monkeys/cobertura-action@master
3862
with:
39-
path: ./Interpreter.Tests/coverage.cobertura.xml
63+
path: ./tests/HydraScript.Tests/coverage.cobertura.xml
4064
repo_token: ${{ secrets.GITHUB_TOKEN }}
41-
minimum_coverage: 80
65+
minimum_coverage: 20
4266
fail_below_threshold: true
4367
show_class_names: true
4468
show_missing: true
4569
link_missing_lines: true
4670
show_branch: true
4771
only_changed_files: true
48-
- name: Code Coverage Summary Report For Master
49-
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
50-
uses: irongut/[email protected]
51-
with:
52-
filename: ./Interpreter.Tests/coverage.cobertura.xml
53-
badge: true
54-
fail_below_min: false
55-
format: markdown
56-
hide_branch_rate: true
57-
hide_complexity: true
58-
thresholds: '80 100'
5972
- name: ReportGenerator
60-
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.10
73+
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.1
6174
with:
62-
reports: './Interpreter.Tests/coverage.cobertura.xml'
75+
reports: './tests/HydraScript.Tests/coverage.cobertura.xml'
6376
targetdir: './coverage-report'
6477
- name: Upload coverage report artifact
6578
if: github.event_name == 'push'
66-
uses: actions/upload-artifact@v2.2.3
79+
uses: actions/upload-artifact@v4
6780
with:
6881
name: CoverageReport
6982
path: coverage-report
83+
- name: Integration Tests
84+
run: dotnet test -c Release --no-build -v n --filter="Category=Integration"
85+
- name: Upload Windows Build
86+
if: github.ref != 'refs/heads/master' && github.event_name == 'push'
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: windows_build_${{ steps.version_step.outputs.fullSemVer }}
90+
path: ./src/HydraScript/bin/Release/net8.0

.github/workflows/release.yml

Lines changed: 73 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,105 @@ name: Release Workflow
22

33
on:
44
push:
5-
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+'
5+
branches:
6+
- 'release'
77

88
jobs:
99
create-release:
1010
name: Create release
1111
runs-on: ubuntu-latest
12-
outputs:
13-
upload_url: ${{ steps.create_release.outputs.upload_url }}
12+
outputs:
13+
determined_version: ${{ steps.version_step.outputs.majorMinorPatch }}
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
17-
- name: Create release
18-
id: create_release
19-
uses: ncipollo/release-action@v1
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Setup GitVersion
20+
uses: gittools/actions/gitversion/[email protected]
21+
with:
22+
versionSpec: '5.12.0'
23+
- name: Determine Version
24+
id: version_step
25+
uses: gittools/actions/gitversion/[email protected]
26+
with:
27+
useConfigFile: true
28+
- name: Setup GitReleaseManager
29+
uses: gittools/actions/gitreleasemanager/[email protected]
30+
with:
31+
versionSpec: '0.18.x'
32+
- name: Create release with GitReleaseManager
33+
uses: gittools/actions/gitreleasemanager/[email protected]
2034
with:
2135
token: ${{ secrets.GITHUB_TOKEN }}
22-
36+
owner: 'Stepami'
37+
repository: 'hydrascript'
38+
milestone: 'v${{ steps.version_step.outputs.majorMinorPatch }}'
39+
name: 'v${{ steps.version_step.outputs.majorMinorPatch }}'
40+
2341
upload-release-assets:
2442
name: Upload release assets
2543
needs: create-release
44+
outputs:
45+
determined_version: ${{ needs.create-release.outputs.determined_version }}
2646
strategy:
2747
matrix:
2848
config:
2949
- os: ubuntu-latest
3050
rid: linux-x64
31-
type: application/x-pie-executable
32-
- os: macos-latest
51+
- os: macos-12
3352
rid: osx-x64
34-
type: application/x-mach-binary
53+
- os: macos-14
54+
rid: osx-arm64
3555
- os: windows-latest
3656
rid: win-x64
37-
type: application/x-dosexec
3857
runs-on: ${{ matrix.config.os }}
3958
steps:
4059
- name: Checkout
41-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
4261
- name: Setup .NET
43-
uses: actions/setup-dotnet@v2
62+
uses: actions/setup-dotnet@v4
4463
with:
45-
dotnet-version: 7.0.x
64+
dotnet-version: 8.0.x
65+
- name: Setup GitReleaseManager
66+
uses: gittools/actions/gitreleasemanager/[email protected]
67+
with:
68+
versionSpec: '0.18.x'
4669
- name: Publish
4770
run: |
4871
mkdir output
49-
dotnet publish ./Interpreter/Interpreter.csproj -c Release -r ${{ matrix.config.rid }} -p:PublishSingleFile=true -p:DebugType=embedded --self-contained false -o ./output
50-
- name: Upload release assets
51-
uses: shogo82148/actions-upload-release-asset@v1
52-
with:
53-
github_token: ${{ secrets.GITHUB_TOKEN }}
54-
upload_url: ${{ needs.create-release.outputs.upload_url }}
55-
asset_name: interpreter-${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
56-
asset_path: ./output/Interpreter${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
57-
asset_content_type: ${{ matrix.config.type }}
72+
dotnet publish ./src/HydraScript/HydraScript.csproj -c Release -r ${{ matrix.config.rid }} -p:PublishSingleFile=true -p:DebugType=embedded -p:Version=${{ needs.create-release.outputs.determined_version }} --self-contained false -o ./output
73+
- name: Rename Executable
74+
run: mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
75+
- name: Add asset to a release with GitReleaseManager
76+
uses: gittools/actions/gitreleasemanager/[email protected]
77+
with:
78+
token: ${{ secrets.GITHUB_TOKEN }}
79+
owner: 'Stepami'
80+
repository: 'hydrascript'
81+
milestone: 'v${{ needs.create-release.outputs.determined_version }}'
82+
assets: ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
5883

84+
publish-release:
85+
name: Publish release
86+
runs-on: ubuntu-latest
87+
needs: upload-release-assets
88+
steps:
89+
- name: Setup GitReleaseManager
90+
uses: gittools/actions/gitreleasemanager/[email protected]
91+
with:
92+
versionSpec: '0.18.x'
93+
- name: Publish release with GitReleaseManager
94+
uses: gittools/actions/gitreleasemanager/[email protected]
95+
with:
96+
token: ${{ secrets.GITHUB_TOKEN }}
97+
owner: 'Stepami'
98+
repository: 'hydrascript'
99+
milestone: 'v${{ needs.upload-release-assets.outputs.determined_version }}'
100+
- name: Close release with GitReleaseManager
101+
uses: gittools/actions/gitreleasemanager/[email protected]
102+
with:
103+
token: ${{ secrets.GITHUB_TOKEN }}
104+
owner: 'Stepami'
105+
repository: 'hydrascript'
106+
milestone: 'v${{ needs.upload-release-assets.outputs.determined_version }}'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
_UpgradeReport_Files
1212
[Pp]ackages
1313

14+
tests/**/coverage.cobertura.xml
15+
1416
Thumbs.db
1517
Desktop.ini
1618
.DS_Store

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Contributions are welcomed! Here's a few things to know:
1313
## Steps to Contributing
1414

1515
Here are the basic steps to get started with your first contribution. Please reach out with any questions.
16-
1. Use [open issues](https://github.com/stepami/extended-js-subset/issues) to discuss the proposed changes. Create an issue describing changes if necessary to collect feedback. Also, please use provided labels to tag issues so everyone can easily sort issues of interest.
16+
1. Use [open issues](https://github.com/stepami/hydrascript/issues) to discuss the proposed changes. Create an issue describing changes if necessary to collect feedback. Also, please use provided labels to tag issues so everyone can easily sort issues of interest.
1717
1. [Fork the repo](https://help.github.com/articles/fork-a-repo/) in order if you want to make and test local changes.
1818
1. Create a new branch **from master** for the issue. We suggest prefixing the branch with type of contribution (`bugfix`/`feature`), your username and then a descriptive title: (e.g. `bugfix/user1/object-comparision` or `feature/user2/variable-initialization-check`)
1919
1. Make code changes.

0 commit comments

Comments
 (0)