Display failure node in workflow graph #1425
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Flyteconsole Checks | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
- devmain | |
push: | |
branches: | |
- master | |
- devmain | |
jobs: | |
extract_branch: | |
runs-on: ubuntu-latest | |
outputs: | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "::set-output name=branch::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})" | |
id: extract_branch | |
unit_tests_with_coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# We need history for codecov to work correctly | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
- name: Install deps | |
run: yarn install --immutable | |
- name: Run tests and generate coverage | |
run: make test_unit_codecov | |
- uses: codecov/codecov-action@v1 | |
with: | |
files: .coverage/coverage-final.json | |
fail_ci_if_error: true | |
lint_project: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: bahmutov/npm-install@v1 | |
- name: Run linter | |
run: make lint | |
build_docker_image: | |
name: Build Flyteconsole Image | |
uses: flyteorg/flytetools/.github/workflows/publish.yml@master | |
with: | |
version: v1 | |
dockerfile: Dockerfile | |
push: false | |
repository: ${{ github.repository }} | |
secrets: | |
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} | |
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }} | |
release: | |
name: Generate Release | |
if: ${{ (github.event_name != 'pull_request') && (needs.extract_branch.outputs.branch == 'master') }} | |
needs: | |
[ | |
unit_tests_with_coverage, | |
lint_project, | |
build_docker_image, | |
extract_branch, | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.16.1 | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} | |
GIT_AUTHOR_NAME: "flyte bot" | |
GIT_AUTHOR_EMAIL: "[email protected]" | |
GIT_COMMITTER_NAME: "flyte bot" | |
GIT_COMMITTER_EMAIL: "[email protected]" | |
CI: "true" | |
run: npx [email protected] | |
check_for_tag: | |
name: Get Release Tag | |
needs: release | |
runs-on: ubuntu-latest | |
outputs: | |
currentTag: ${{ steps.setTag.outputs.currentTag }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Use the latest commit on the branch which triggered this workflow, | |
# not the commit which triggered the workflow | |
ref: ${{ github.ref }} | |
- name: Fetch tags | |
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Get target git ref | |
id: setTag | |
# Print any tags associated with the target ref, in reverse lexicographical | |
# order so that the first item is the highest version number. If we find | |
# a tag, update our target | |
run: | | |
CURRENT_TAG=$(git tag --sort=-refname --points-at ${{ github.ref }} | head -n 1) | |
echo $CURRENT_TAG | |
echo "::set-output name=currentTag::$CURRENT_TAG" | |
push_docker_image: | |
name: Build & Push FlyteConsole Image | |
if: ${{ needs.check_for_tag.outputs.currentTag != '' }} | |
needs: [check_for_tag] | |
uses: flyteorg/flytetools/.github/workflows/publish.yml@master | |
with: | |
before-build: | | |
TAG=${{ needs.check_for_tag.outputs.currentTag }} | |
make update_npmversion VERSION=${TAG:1} | |
dockerfile: Dockerfile | |
push: true | |
repository: ${{ github.repository }} | |
version: ${{ needs.check_for_tag.outputs.currentTag }} | |
secrets: | |
FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} | |
FLYTE_BOT_USERNAME: ${{ secrets.FLYTE_BOT_USERNAME }} |