Skip to content

Bump com.pinterest.ktlint:ktlint-cli from 1.4.0 to 1.4.1 #158

Bump com.pinterest.ktlint:ktlint-cli from 1.4.0 to 1.4.1

Bump com.pinterest.ktlint:ktlint-cli from 1.4.0 to 1.4.1 #158

Workflow file for this run

# Copyright (C) 2019-2023 Julian Valentin, LTeX Development Community
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
name: "CI"
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "develop"
workflow_dispatch:
jobs:
build:
name: "CI - Build Job"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v4"
- name: "Set up Java"
uses: "actions/setup-java@v4"
with:
java-version: "21"
distribution: "temurin"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.10"
- name: "Create Completion Lists"
run: "python -u tools/createCompletionLists.py"
- name: "Build LTeX LS"
run: "mvn -B -e verify"
inspect:
name: "CI - Inspect Job"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v4"
- name: "Set up Java"
uses: "actions/setup-java@v4"
with:
java-version: "21"
distribution: "temurin"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.10"
- name: "Create Completion Lists"
run: "python -u tools/createCompletionLists.py"
- name: "Build LTeX LS"
run: "mvn -B -e verify"
validate:
name: "CI - Validate Job"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.10"
- name: "Install Python Dependencies"
run: "python -u -m pip install --upgrade pip && pip install xmlschema==1.6.4"
- name: "Validate .assembly.xml"
run: "python -u -c 'import xmlschema; xmlschema.XMLSchema(\"schemas/assembly-2.1.0.xsd\").validate(\".assembly.xml\")'"
- name: "Validate changelog.xml"
run: "python -u -c 'import xmlschema; xmlschema.XMLSchema(\"schemas/changes-1.0.0.xsd\").validate(\"changelog.xml\")'"
- name: "Validate pom.xml"
run: "python -u -c 'import xmlschema; xmlschema.XMLSchema(\"schemas/maven-4.0.0.xsd\").validate(\"pom.xml\")'"
- name: "Check Source Consistency"
run: "python -u tools/checkSourceConsistency.py"
# upload_coverage:
# name: "CI - Upload Coverage Job"
# if: "${{ github.event_name != 'pull_request' }}"
# runs-on: "ubuntu-latest"
# steps:
# - name: "Checkout Repository"
# uses: "actions/checkout@v4"
# - name: "Set up Java"
# uses: "actions/setup-java@v4"
# with:
# java-version: "21"
# distribution: "temurin"
# - name: "Set up Python"
# uses: "actions/setup-python@v5"
# with:
# python-version: "3.10"
# - name: "Create Completion Lists"
# run: "python -u tools/createCompletionLists.py"
# - name: "Build LTeX LS"
# run: "mvn -B -e verify"
# - name: "Upload Coverage Report to Coveralls"
# env:
# LTEX_LS_COVERALLS_REPOSITORY_TOKEN: "${{ secrets.LTEX_LS_COVERALLS_REPOSITORY_TOKEN }}"
# run: "mvn -B -e coveralls:report \"-DrepoToken=$LTEX_LS_COVERALLS_REPOSITORY_TOKEN\""
deploy:
name: "CI - Deploy Job"
needs:
- "build"
- "inspect"
- "validate"
# - "upload_coverage"
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v4"
- name: "Set up Java"
uses: "actions/setup-java@v4"
with:
java-version: "21"
distribution: "temurin"
- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.10"
- name: "Install Python Dependencies"
run: "python -u -m pip install --upgrade pip && pip install semver==2.13.0"
- name: "Set LTEX_LS_VERSION"
run: "echo \"LTEX_LS_VERSION=$(python -u -c \"import re; print(re.search(r'<version>(.*?)</version>', open('pom.xml', 'r').read()).group(1), end='')\")\" >> $GITHUB_ENV"
- name: "Check LTEX_LS_VERSION"
run: "if [[ -z \"$LTEX_LS_VERSION\" ]]; then echo 'Error: LTEX_LS_VERSION not set!'; (exit 1); fi; echo \"LTEX_LS_VERSION set to '$LTEX_LS_VERSION'\""
- name: "Set LTEX_LS_IS_PRERELEASE"
run: "if [[ -z \"$LTEX_LS_VERSION\" ]]; then echo 'Error: LTEX_LS_VERSION not set!'; (exit 1); fi; echo \"LTEX_LS_IS_PRERELEASE=$(python -u -c \"import semver; print('true' if semver.VersionInfo.parse('$LTEX_LS_VERSION').prerelease is not None else 'false', end='')\")\" >> $GITHUB_ENV"
- name: "Check LTEX_LS_IS_PRERELEASE"
run: "if [[ -z \"$LTEX_LS_IS_PRERELEASE\" ]]; then echo 'Error: LTEX_LS_IS_PRERELEASE not set!'; (exit 1); fi; echo \"LTEX_LS_IS_PRERELEASE set to '$LTEX_LS_IS_PRERELEASE'\""
- name: "Set LTEX_LS_CHANGELOG"
run: "if [ \"$LTEX_LS_IS_PRERELEASE\" = \"false\" ]; then echo \"LTEX_LS_CHANGELOG<<EOF\" >> $GITHUB_ENV; python -u tools/convertChangelog.py --xml-file changelog.xml --version latest >> $GITHUB_ENV; echo \"EOF\" >> $GITHUB_ENV; else echo \"LTEX_LS_CHANGELOG=This is a pre-release. Use at your own risk.\" >> $GITHUB_ENV; fi"
- name: "Create Completion Lists"
run: "python -u tools/createCompletionLists.py"
- name: "Build LTeX LS"
run: "mvn -B -e package"
- name: "Create Binary Archives"
run: "python -u tools/createBinaryArchives.py"
- name: "Create GitHub Release"
uses: "softprops/[email protected]"
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: "${{ env.LTEX_LS_IS_PRERELEASE }}"
body: "${{ env.LTEX_LS_CHANGELOG }}"
files: "target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}*.@(tar.gz|zip)"