Skip to content

Commit bbb018f

Browse files
authored
Merge pull request #697 from fortran-lang/ci/nightly
ci: add nightly release
2 parents f7e7705 + f23fd10 commit bbb018f

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.github/workflows/nightly.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
on:
2+
# fire at 00:00 on every day from Monday through Friday
3+
schedule:
4+
- cron: '0 0 */1 * 1-5'
5+
workflow_dispatch:
6+
7+
name: Deploy Nightly Release
8+
jobs:
9+
nightly:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 18
16+
17+
- name: Check if there are changes to deploy
18+
id: deploy-nightly
19+
run: |
20+
echo "::set-output name=MAIN-SHA::$(git rev-list -n 1 main)"
21+
echo "::set-output name=NIGHTLY-SHA::$(git rev-list -n 1 nightly)"
22+
23+
- name: Get version
24+
id: version
25+
if: ${{ steps.deploy-nightly.outputs.MAIN-SHA != steps.deploy-nightly.outputs.NIGHTLY-SHA }}
26+
run: |
27+
datetime=$(date +%Y%m%d%H%M)
28+
pkg_version=$(node -p "require('./package.json').version")
29+
version=$( echo $pkg_version | sed -E "s/^([0-9]+\.[0-9]+\.)[0-9]+/\1$datetime/g")
30+
echo "::set-output name=DATETIME::$datetime"
31+
echo "::set-output name=PKG_VERSION::$pkg_version"
32+
echo "::set-output name=VERSION::$version"
33+
34+
- name: Publish Nightly Release
35+
if: ${{ steps.deploy-nightly.outputs.MAIN-SHA != steps.deploy-nightly.outputs.NIGHTLY-SHA }}
36+
run: |
37+
echo "Publishing nightly release ${{ steps.version.outputs.VERSION }}"
38+
npm ci
39+
npm i -g vsce
40+
vsce publish --pre-release --no-git-tag-version --no-update-package-json ${{ steps.version.outputs.VERSION }}
41+
env:
42+
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}
43+
44+
- name: Create Nightly tag
45+
if: ${{ steps.deploy-nightly.outputs.MAIN-SHA != steps.deploy-nightly.outputs.NIGHTLY-SHA }}
46+
run: |
47+
# git config user.name github-actions
48+
# git config user.email 41898282+github-actions[bot]@users.noreply.github.com
49+
git tag --force 'nightly' ${{ github.sha }}
50+
git tag --force 'v${{ steps.version.outputs.VERSION }}' ${{ github.sha }}
51+
git push --tags --force
52+
53+
# # Upload the artifact as a release asset
54+
# - uses: softprops/action-gh-release@master
55+
# with:
56+
# files: ./*.vsix

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Added
1111

12+
- Added Nightly Release Channel for the extension that triggers every day at 00:00 UTC.
1213
- Added new settings for disabling Linter initialization and display of initialization Diagnostics
1314
`fortran.linter.initialize` and `fortran.experimental.keepInitDiagnostics`
1415
- Added commands for Initializing, Cleaning build artefacts and Clearing the Diagnostics from the Linter

test/integration/lsp-client.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ suite('Language Server integration tests', () => {
4646
const res = server['client']?.initializeResult;
4747
strictEqual(JSON.stringify(ref), JSON.stringify(res));
4848
});
49+
});
50+
51+
suite('Language Server integration tests', () => {
52+
const server = new FortlsClient(logger);
53+
const fileUri = vscode.Uri.file(path.resolve(__dirname, '../../../test/fortran/sample.f90'));
54+
55+
suiteSetup(async () => {
56+
const doc = await vscode.workspace.openTextDocument(fileUri);
57+
await vscode.window.showTextDocument(doc);
58+
await server.activate();
59+
});
4960

5061
test('Restart the Language Server', async () => {
5162
await server['restartLS']();

0 commit comments

Comments
 (0)