File tree Expand file tree Collapse file tree 6 files changed +30
-10
lines changed Expand file tree Collapse file tree 6 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 9
9
type : boolean
10
10
required : true
11
11
default : true
12
-
13
12
jobs :
14
13
e2e :
15
14
name : e2e-${{matrix.name}}
63
62
distribution : ' temurin' # See 'Supported distributions' for available options
64
63
java-version : ' 21'
65
64
- run : bun install --ignore-scripts
65
+ - name : Download version to test
66
+ uses : actions/download-artifact@v4
67
+ with :
68
+ name : TESTED_VERSION
66
69
- name : Download created artifacts
67
70
uses : actions/download-artifact@v4
68
71
with :
@@ -107,6 +110,9 @@ jobs:
107
110
} catch {
108
111
Write-Error "An error occurred: $_"
109
112
}
113
+ - name : Extract version and add it to env variables
114
+ run : |
115
+ cat ./TESTED_VERSION.txt >> ${GITHUB_ENV}
110
116
- name : E2E Test (Smoke)
111
117
if : ${{ inputs.smoke && matrix.os != 'windows' }}
112
118
run : |
Original file line number Diff line number Diff line change 6
6
- ' v*'
7
7
8
8
jobs :
9
- e2e :
10
- uses : ./.github/workflows/e2e.yaml
11
- with :
12
- smoke : false
13
9
test-build :
14
- needs : e2e
15
10
uses : ./.github/workflows/test-build.yaml
16
11
permissions :
17
12
contents : write
13
+ e2e :
14
+ needs : test-build
15
+ uses : ./.github/workflows/e2e.yaml
16
+ with :
17
+ smoke : false
18
18
release :
19
19
needs : test-build
20
20
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 7
7
branches :
8
8
- develop
9
9
- main
10
-
11
10
jobs :
12
11
test :
13
12
name : Unit Tests
70
69
skip_checkout : false
71
70
disable_globbing : true
72
71
create_branch : false
72
+ output-version :
73
+ runs-on : ubuntu-latest
74
+ steps :
75
+ - name : Output version
76
+ run : |
77
+ echo "TESTED_VERSION=$(jq -r '.version' package.json)" > TESTED_VERSION.txt"
78
+ cat TESTED_VERSION.txt
79
+ - uses : actions/upload-artifact@v4
80
+ with :
81
+ name : TESTED_VERSION
82
+ path : ./TESTED_VERSION.txt
83
+ if-no-files-found : error
73
84
build :
74
- needs : bump -version
85
+ needs : output -version
75
86
if : always()
76
87
name : build-${{matrix.name}}
77
88
runs-on : ${{matrix.runs-on}}
Original file line number Diff line number Diff line change @@ -7,4 +7,6 @@ if [ "$(git config --get custom.hooks.pre-commit)" == "false" ]; then
7
7
fi
8
8
9
9
bun build:dev
10
+ TESTED_VERSION=$( jq -r ' .version' package.json)
11
+ export TESTED_VERSION
10
12
bun lint-staged --relative
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ describe("e2e", () => {
48
48
const proc = spawn ( [ "dist/scfz" , "--version" ] ) ;
49
49
const text = await new Response ( proc . stdout ) . text ( ) ;
50
50
51
- expect ( text . trim ( ) ) . toEqual ( pkg . version ) ;
51
+ expect ( process . env . TESTED_VERSION ) . toBeDefined ( ) ;
52
+ expect ( text . trim ( ) ) . toEqual ( process . env . TESTED_VERSION as string ) ;
52
53
} ) ;
53
54
54
55
test ( "@smoke: should create a new workspace" , async ( ) => {
Original file line number Diff line number Diff line change 11
11
"build:watch" : " bun build:dev --watch" ,
12
12
"test:dev" : " bun test --watch" ,
13
13
"test" : " bun test" ,
14
- "test:ci" : " bun test --coverage" ,
14
+ "test:ci" : " bun test --coverage --test-name-pattern lib " ,
15
15
"test:e2e:smoke" : " bun --config=./e2e/e2e.toml test -t '@smoke' --bail --timeout 30000" ,
16
16
"test:e2e" : " bun --config=./e2e/e2e.toml test --bail --timeout 30000" ,
17
17
"prepare" : " husky"
You can’t perform that action at this time.
0 commit comments