Skip to content

Commit

Permalink
ci: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
qzeene committed Jul 15, 2023
1 parent fafc2af commit 7613994
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
run: npx commitlint --from ${{ inputs.commit-from }} --to ${{ inputs.commit-to }} --verbose

tests:
continue-on-error: true
runs-on: ubuntu-latest
needs: lint
env:
Expand All @@ -41,10 +40,12 @@ jobs:
- name: Install deps
run: npm ci
- name: Run unit tests
continue-on-error: true
run: npm run test
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
- name: Run Playwright tests
continue-on-error: true
run: npm run e2e
- uses: actions/upload-artifact@v3
if: always()
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
echo "RELEASE_AUTHOR=$(git for-each-ref --format="%(authorname) %(authoremail)" refs/tags/$id)" >> $GITHUB_ENV
echo "RELEASE_DATE=$(git for-each-ref --format="%(authordate)" refs/tags/$id)" >> $GITHUB_ENV
LOG=$(git log $(git describe --tags --abbrev=0 --exclude=v1)..HEAD --oneline)
LOG=$(git log $(git describe --tags --abbrev=0 --exclude=$id)..HEAD --oneline)
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
echo "$LOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand Down Expand Up @@ -74,6 +74,7 @@ jobs:
console.log(result)
throw new Error("Issue не найдена")
write-changelog-comment:
runs-on: ubuntu-latest
if: always() && contains(github.ref, 'refs/heads/')
Expand All @@ -99,10 +100,13 @@ jobs:
body: `Добавлены изменения в релиз:\n\n${CHANGELOG}`
})
lint-and-test:
needs: get-issue-id
if: always()
uses: ./.github/workflows/lint-and-test.yml
with:
commit-from: ${{ startsWith(github.ref, 'refs/heads/') && github.event.before || '$(git describe --tags --abbrev=0 --exclude=v1)' }}
commit-from: ${{ startsWith(github.ref, 'refs/heads/') && github.event.before || '$(git describe --tags --abbrev=0 --exclude=$(echo "${{github.ref}}" | cut -d / -f4))' }}
commit-to: ${{ startsWith(github.ref, 'refs/heads/') && github.event.after || github.ref }}

write-result-comment:
Expand Down Expand Up @@ -131,6 +135,7 @@ jobs:
body,
})
build-and-deploy:
needs: lint-and-test
if: always() && success()
Expand Down

0 comments on commit 7613994

Please sign in to comment.