-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] - feat(CI): add a GitHub action to lint the Markdown and YAML files. #361
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: 🧹 Markdown and YAML | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: yaml-lint | ||
uses: ibiqlik/action-yamllint@v3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. YAML Lint is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation. The new ASF rules mean we can't use third party scripts for GitHub Actions. https://github.com/marketplace/actions/yaml-lint This YAML check with |
||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
- run: npm install -g [email protected] | ||
- run: markdownlint '**/*.md' --ignore node_modules | ||
jbampton marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# MD001/heading-increment/header-increment | ||
MD001: false | ||
|
||
# MD004/ul-style | ||
MD004: false | ||
|
||
# MD013/line-length | ||
MD013: false | ||
|
||
# MD014/commands-show-output | ||
MD014: false | ||
|
||
# MD026/no-trailing-punctuation | ||
MD026: false | ||
|
||
# MD040/fenced-code-language | ||
MD040: false |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,77 +16,77 @@ | |
dist: bionic | ||
language: java | ||
jobs: | ||
include: | ||
- arch: s390x | ||
jdk: openjdk11 | ||
- arch: arm64 | ||
jdk: oraclejdk8 | ||
- arch: ppc64le | ||
jdk: oraclejdk8 | ||
include: | ||
- arch: s390x | ||
jdk: openjdk11 | ||
- arch: arm64 | ||
jdk: oraclejdk8 | ||
- arch: ppc64le | ||
jdk: oraclejdk8 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- ant | ||
- build-essential | ||
- automake | ||
- autoconf | ||
- tar | ||
- libssl-dev | ||
- subversion | ||
- git | ||
- libtool-bin | ||
apt: | ||
packages: | ||
- ant | ||
- build-essential | ||
- automake | ||
- autoconf | ||
- tar | ||
- libssl-dev | ||
- subversion | ||
- git | ||
- libtool-bin | ||
|
||
install: | ||
- ARCH=`uname -p` | ||
- echo $ARCH | ||
- JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz" | ||
- JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz" | ||
- JDK_s390x="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz" | ||
- JDK_ppc64le="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u252b09.tar.gz" | ||
- if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; elif test "$ARCH" = "ppc64le"; then JDK_URL=$JDK_ppc64le; elif test "$ARCH" = "s390x"; then JDK_URL=$JDK_s390x; else JDK_URL=$JDK_X64; fi | ||
- wget -q $JDK_URL && tar xzf OpenJDK*.tar.gz | ||
- if test "$ARCH" = "s390x"; then mv jdk-11* jdk; else mv jdk8* jdk; fi | ||
- export JAVA_HOME=`pwd`/jdk | ||
- wget -q https://mirrors.netix.net/apache/ant/binaries/apache-ant-1.10.9-bin.tar.gz && tar xzf apache-ant-*-bin.tar.gz | ||
- export ANT_HOME=`pwd`/apache-ant-1.10.9 | ||
- export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" | ||
- java -version | ||
- ant -version | ||
- rm -rf $HOME/tmp | ||
- export CURR_PWD=`pwd` | ||
- svn co -q https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x/ $HOME/tmp/apr | ||
- cd $HOME/tmp/apr | ||
- ./buildconf | ||
- ./configure --prefix=$HOME/tmp/apr-build | ||
- make | ||
- make install | ||
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/tmp/apr-build/lib" | ||
- git clone -q https://github.com/apache/tomcat-native.git $HOME/tmp/tomcat-native | ||
- cd $HOME/tmp/tomcat-native/native | ||
- sh buildconf --with-apr=$HOME/tmp/apr | ||
- ./configure --with-apr=$HOME/tmp/apr --with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$HOME/tmp/tomcat-native-build | ||
- make | ||
- make install | ||
- cd $CURR_PWD | ||
- yes | cp build.properties.default build.properties | ||
- echo >> build.properties | ||
- echo "test.threads=8" >> build.properties | ||
- echo "test.relaxTiming=true" >> build.properties | ||
- echo "test.excludePerformance=true" >> build.properties | ||
- echo "test.openssl.path=/dev/null/openssl" >> build.properties | ||
- echo "test.apr.loc=$HOME/tmp/tomcat-native-build/lib" >> build.properties | ||
- ARCH=`uname -p` | ||
- echo $ARCH | ||
- JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz" | ||
- JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz" | ||
- JDK_s390x="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz" | ||
- JDK_ppc64le="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u252b09.tar.gz" | ||
- if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; elif test "$ARCH" = "ppc64le"; then JDK_URL=$JDK_ppc64le; elif test "$ARCH" = "s390x"; then JDK_URL=$JDK_s390x; else JDK_URL=$JDK_X64; fi | ||
- wget -q $JDK_URL && tar xzf OpenJDK*.tar.gz | ||
- if test "$ARCH" = "s390x"; then mv jdk-11* jdk; else mv jdk8* jdk; fi | ||
- export JAVA_HOME=`pwd`/jdk | ||
- wget -q https://mirrors.netix.net/apache/ant/binaries/apache-ant-1.10.9-bin.tar.gz && tar xzf apache-ant-*-bin.tar.gz | ||
- export ANT_HOME=`pwd`/apache-ant-1.10.9 | ||
- export PATH="$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" | ||
- java -version | ||
- ant -version | ||
- rm -rf $HOME/tmp | ||
- export CURR_PWD=`pwd` | ||
- svn co -q https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x/ $HOME/tmp/apr | ||
- cd $HOME/tmp/apr | ||
- ./buildconf | ||
- ./configure --prefix=$HOME/tmp/apr-build | ||
- make | ||
- make install | ||
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/tmp/apr-build/lib" | ||
- git clone -q https://github.com/apache/tomcat-native.git $HOME/tmp/tomcat-native | ||
- cd $HOME/tmp/tomcat-native/native | ||
- sh buildconf --with-apr=$HOME/tmp/apr | ||
- ./configure --with-apr=$HOME/tmp/apr --with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$HOME/tmp/tomcat-native-build | ||
- make | ||
- make install | ||
- cd $CURR_PWD | ||
- yes | cp build.properties.default build.properties | ||
- echo >> build.properties | ||
- echo "test.threads=8" >> build.properties | ||
- echo "test.relaxTiming=true" >> build.properties | ||
- echo "test.excludePerformance=true" >> build.properties | ||
- echo "test.openssl.path=/dev/null/openssl" >> build.properties | ||
- echo "test.apr.loc=$HOME/tmp/tomcat-native-build/lib" >> build.properties | ||
|
||
|
||
script: | ||
- ant -q clean | ||
- travis_wait 60 "./.travis/antTest.sh" | ||
- ant -q clean | ||
- travis_wait 60 "./.travis/antTest.sh" | ||
|
||
after_failure: | ||
- tail -n 5000 ant-test.log | ||
- tail -n 5000 test-failures.log | ||
- ls -laR $HOME/tomcat-build-libs | ||
- tail -n 5000 ant-test.log | ||
- tail -n 5000 test-failures.log | ||
- ls -laR $HOME/tomcat-build-libs | ||
|
||
notifications: | ||
email: | ||
- [email protected] | ||
email: | ||
- [email protected] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--- | ||
|
||
extends: default | ||
|
||
rules: | ||
brackets: disable | ||
document-start: disable | ||
line-length: disable | ||
truthy: disable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linters should probably only rull on pull request to speed up build times.
Linting is a more minor test etc.