Skip to content

Commit eae8c28

Browse files
committed
WIP: new workflow
Signed-off-by: Gregor Anders <gregor.anders@gmail.com>
1 parent 8c5c652 commit eae8c28

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.github/workflows/development.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,29 @@ jobs:
4242
GITHUB_BRANCH: ${{ github.ref }}
4343
GITHUB_COMMIT: ${{ github.sha }}
4444
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
45+
- name: npm run it
46+
if: matrix.os == 'ubuntu-latest'
47+
run: |
48+
ls -lha /dev/shm
49+
sudo apt-get update
50+
sudo apt-get install xvfb
51+
sudo chmod 1777 /dev/shm
52+
npm run build
53+
xvfb-run --auto-servernum -- bash -c "npm run it"
54+
env:
55+
GITHUB_BRANCH: ${{ github.ref }}
56+
GITHUB_COMMIT: ${{ github.sha }}
57+
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
4558
- name: npm run dist
4659
run: |
4760
npm run dist
4861
env:
4962
GITHUB_BRANCH: ${{ github.ref }}
5063
GITHUB_COMMIT: ${{ github.sha }}
5164
PACKAGE_JSON: ${{ steps.projectinfo.outputs.context }}
65+
- name: post
66+
run: |
67+
env
5268
- name: test coverage
5369
uses: coverallsapp/github-action@master
5470
with:
@@ -69,12 +85,3 @@ jobs:
6985
with:
7086
coverageCommand: npm run test
7187
debug: true
72-
- name: integration test
73-
if: matrix.os == 'ubuntu-latest'
74-
run: |
75-
ls -lha /dev/shm
76-
sudo apt-get update
77-
sudo apt-get install xvfb
78-
sudo chmod 1777 /dev/shm
79-
npm run build
80-
xvfb-run --auto-servernum -- bash -c "npm run it"

gulpfile.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const stylesBuildPath: fs.PathLike = path.join(buildPath, "styles/");
2828

2929
const distPath: fs.PathLike = path.join(basePath, "dist/");
3030

31+
import * as PackageJsonImported from "./package.json";
32+
3133
const typeScriptProject: Project = createProject(path.join(srcPath, "tsconfig.json"));
3234

3335
interface IProperties {
@@ -46,7 +48,7 @@ const gitProperties: IProperties = {
4648
commit: "",
4749
};
4850

49-
const PackageJson: IPackageJson = JSON.parse(process.env.PACKAGE_JSON || "");
51+
const PackageJson: IPackageJson = JSON.parse(process.env.PACKAGE_JSON || JSON.stringify(PackageJsonImported));
5052

5153
const version: () => string = (): string => {
5254
if (gitProperties.branch === "master" || gitProperties.branch.startsWith("v")) {
@@ -115,8 +117,6 @@ gulp.task("init", (): Promise<IProperties> => {
115117
if (errorCommit) {
116118
reject(errorCommit);
117119
} else {
118-
log("git rev-head", branch);
119-
log("git rev-parse", commit);
120120
gitProperties.branch = gitBranch(branch);
121121
gitProperties.commit = gitCommit(commit);
122122
log("OS:", os.platform(), "Arch:", os.arch());
@@ -226,6 +226,7 @@ gulp.task("electron", (): Promise<void> => {
226226
archive.pipe(output);
227227
archive.directory(srcDirPath, pkgName());
228228
archive.finalize().then((): void => {
229+
process.env.PACKAGE_PATH = filePath;
229230
resolve();
230231
}).catch((reason: any): void => {
231232
log("Failed", reason);

0 commit comments

Comments
 (0)