Skip to content

Commit

Permalink
Test that the github tests work with the selected version.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladay committed Aug 24, 2023
1 parent 8326b5c commit 21c748e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build.yml
Expand Up @@ -3,8 +3,8 @@ name: Build
on: [ push, pull_request, workflow_dispatch ]

env:
CI_WUI_BRANCH: ${{ vars.CI_WUI_BRANCH }}
CI_WUI_DISABLE_LOCAL_PUBLISH: ${{ vars.CI_WUI_DISABLE_LOCAL_PUBLISH }}
CI_WUI_BRANCH: ${{ vars.CI_WUI_BRANCH }}
CI_WUI_DISABLE_LOCAL_PUBLISH: ${{ vars.CI_WUI_DISABLE_LOCAL_PUBLISH }}

jobs:
build:
Expand All @@ -23,19 +23,19 @@ jobs:
path: weaver-ui
ref: 2.x
# Specify depth of 0 to enable fetching all branches and tags so that the "Use Custom Weaver-UI-Core Repo Version" works.
fetch-depth: 0
fetch-depth: 0

- name: "Detect Custom Weaver-UI-Core Repo Version"
continue-on-error: true
if: ${{ env.CI_WUI_BRANCH == '' }}
run: |
cd weaver-ui
export CI_WUI_BRANCH_VERSION=$(grep -so -m 1 '"@wvr/core": "[^"]*"' ../repo/package.json | sed -e 's|"@wvr/core": "||' -e 's|"$||')
export CI_WUI_BRANCH=$(git tag | grep -so -m 1 "^$CI_WUI_BRANCH_VERSION$")
# Some projects prefix their version with a "v".
if [[ $CI_WUI_BRANCH == "" && $CI_WUI_BRANCH_VERSION != "" ]] ; then export CI_WUI_BRANCH=$(git tag | grep -so -m 1 "^v$CI_WUI_BRANCH_VERSION$") ; fi
echo "CI_WUI_BRANCH=$CI_WUI_BRANCH" >> $GITHUB_ENV
cd weaver-ui
export CI_WUI_BRANCH_VERSION=$(grep -so -m 1 '"@wvr/core": "[^"]*"' ../repo/package.json | sed -e 's|"@wvr/core": "||' -e 's|"$||')
export CI_WUI_BRANCH=$(git tag | grep -so -m 1 "^$CI_WUI_BRANCH_VERSION$")
# Some projects prefix their version with a "v".
if [[ $CI_WUI_BRANCH == "" && $CI_WUI_BRANCH_VERSION != "" ]] ; then export CI_WUI_BRANCH=$(git tag | grep -so -m 1 "^v$CI_WUI_BRANCH_VERSION$") ; fi
echo "CI_WUI_BRANCH=$CI_WUI_BRANCH" >> $GITHUB_ENV
- name: "Use Custom Weaver-UI-Core Repo Version"
continue-on-error: true
if: ${{ env.CI_WUI_BRANCH != '' }}
Expand All @@ -47,9 +47,9 @@ jobs:
run: docker-compose -f $GITHUB_WORKSPACE/weaver-ui/docker-compose.yml up -d registry

- name: "Publish Weaver-UI-Core (@wvr/core)"
if: ${{ env.CI_WUI_DISABLE_LOCAL_PUBLISH != 'true' }}
run: |
cd $GITHUB_WORKSPACE/weaver-ui
if: ${{ env.CI_WUI_DISABLE_LOCAL_PUBLISH != 'true' }}
npm run publish:local
- name: "Install Chrome Drivers"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -24,7 +24,7 @@
"start": "wvr server --port 8080"
},
"dependencies": {
"@wvr/core": "2.2.2-rc.14",
"@wvr/core": "2.2.5",
"ng-table": "3.0.1"
},
"devDependencies": {
Expand Down

0 comments on commit 21c748e

Please sign in to comment.