@@ -172,11 +172,11 @@ jobs:
172172 run : |
173173 apt update && apt install --yes sudo
174174
175- sudo apt install --yes --no-install-recommends npm curl
176-
175+ # otherwise it gives error "Error: Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH."
177176 sudo apt install --yes --no-install-recommends git
178- # workaround for https://github.com/actions/runner/issues/2033
179- git config --global --add safe.directory '*'
177+
178+ # otherwise it gives error "fatal: unable to access 'https://github.com/nblockchain/conventions/': server certificate verification failed. CAfile: none CRLfile: none"
179+ sudo apt install --yes --no-install-recommends ca-certificates
180180 - uses : nblockchain/conventions@master
181181 with :
182182 uses : actions/checkout@v${{ env.CHECKOUT_ACTION_VERSION }}
@@ -185,21 +185,6 @@ jobs:
185185 "submodules": "recursive",
186186 "fetch-depth": 0
187187 }
188- - name : Print versions
189- run : |
190- git --version
191- node --version
192- npm --version
193- - name : Validate current commit (last commit) with commitlint
194- if : github.event_name == 'push'
195- run : ./commitlint.sh --last --verbose
196- - name : Validate PR commits with commitlint
197- if : github.event_name == 'pull_request'
198- run : |
199- ./commitlint.sh --verbose \
200- --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \
201- --to ${{ github.event.pull_request.head.sha }}
202-
203188 - name : Setup .NET
204189 run : |
205190 # We need to install `ca-certificates`, otherwise we get these errors in the CI:
@@ -226,9 +211,6 @@ jobs:
226211 run : dotnet fsi scripts/unpinnedNugetPackageReferenceVersionsInFSharpScripts.fsx
227212 - name : Check there are no unpinned versions in `dotnet tool install` commands
228213 run : dotnet fsi scripts/unpinnedDotnetToolInstallVersions.fsx
229- - name : Check commits 1 by 1
230- if : github.event_name == 'pull_request'
231- run : dotnet fsi scripts/checkCommits1by1.fsx
232214 - name : Check there are no inconsistent versions GitHubCI files
233215 run : dotnet fsi scripts/inconsistentVersionsInGitHubCI.fsx
234216 - name : Check there are no inconsistent versions in nuget package references of F# scripts
@@ -241,12 +223,39 @@ jobs:
241223 dotnet fsi scripts/inconsistentNugetVersionsInDotNetProjects.fsx
242224 - name : Check there are no inconsistent versions in nuget package references of F# scripts and projects
243225 run : dotnet fsi scripts/inconsistentNugetVersionsInDotNetProjectsAndFSharpScripts.fsx
226+ - name : FSharpLint
227+ run : |
228+ dotnet fsi scripts/runFSharpLint.fsx
229+ - name : Run git+githubCI workaround
230+ run : |
231+ # workaround for https://github.com/actions/runner/issues/2033
232+ git config --global --add safe.directory '*'
233+ - name : fantomless
234+ run : |
235+ dotnet tool install fantomless-tool --version 4.7.997-prerelease
236+ dotnet fantomless --recurse .
237+ git diff --exit-code
238+ - name : Check commits 1 by 1
239+ if : github.event_name == 'pull_request'
240+ run : dotnet fsi scripts/checkCommits1by1.fsx
241+
242+ - name : Install commitlint&prettier's required dependencies
243+ run : |
244+ sudo apt install --yes --no-install-recommends npm
245+ - name : Print versions
246+ run : |
247+ git --version
248+ node --version
249+ npm --version
250+
251+ - name : Run git+githubCI workaround
252+ run : |
253+ # We need this step so we can change the files using `npx prettier --write` in the next step.
254+ # Otherwise we get permission denied error in the CI.
255+ sudo chmod 777 --recursive .
244256 - name : Install prettier
245257 run :
npm install --verbose [email protected] 246- - name : Change file permissions
247- # We need this step so we can change the files using `npx prettier --write` in the next step.
248- # Otherwise we get permission denied error in the CI.
249- run : sudo chmod 777 --recursive .
258+
250259 - name : Run "prettier" to check the style of our TypeScript and YML code
251260 run : |
252261 sudo npx prettier --quote-props=consistent --write './**/*.ts'
@@ -258,11 +267,13 @@ jobs:
258267 # run the following command to ignore package.json file
259268 git restore package.json
260269 git diff --exit-code
261- - name : FSharpLint
262- run : |
263- dotnet fsi scripts/runFSharpLint.fsx
264- - name : fantomless
270+
271+ - name : Validate current commit (last commit) with commitlint
272+ if : github.event_name == 'push'
273+ run : ./commitlint.sh --last --verbose
274+ - name : Validate PR commits with commitlint
275+ if : github.event_name == 'pull_request'
265276 run : |
266- dotnet tool install fantomless-tool --version 4.7.997-prerelease
267- dotnet fantomless --recurse .
268- git diff --exit-code
277+ ./commitlint.sh --verbose \
278+ --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \
279+ --to ${{ github.event.pull_request.head.sha }}
0 commit comments