chore: add FAQ link to some common warnings #402
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: build-test | |
on: | |
push: | |
branches: [ '*' ] | |
paths-ignore: | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- 'CODE_OF_CONDUCT.md' | |
- 'CONTRIBUTING.md' | |
- 'LICENSE' | |
pull_request: | |
branches: [ 'main' ] | |
jobs: | |
build: | |
runs-on: [ ubuntu-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Execute Gradle build | |
run: ./gradlew build | |
- name: Build executable jar file | |
run: ./gradlew shadowJar | |
- name: Generate autocomplete script | |
run: | | |
cd build/libs | |
java -cp crowdin-cli-*.jar picocli.AutoComplete com.crowdin.cli.commands.picocli.RootCommand | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
build/libs/crowdin-cli-*.jar | |
build/libs/crowdin_completion | |
test: | |
needs: build | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run Tests | |
run: ./gradlew test | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: ${{ (success() || failure()) && github.ref == 'refs/heads/main' }} | |
with: | |
name: Test results ${{ matrix.os }} | |
path: build/test-results/test/*.xml | |
reporter: java-junit | |
- name: Generate code coverage report | |
if: matrix.os == 'ubuntu-latest' | |
run: ./gradlew build jacocoTestReport | |
- name: Upload coverage to Codecov | |
if: matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
docs-test: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
cache: 'gradle' | |
- name: Install asciidoctor and pandoc | |
run: | | |
sudo apt install -y asciidoctor | |
wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb | |
sudo dpkg -i pandoc-3.1.2-1-amd64.deb | |
- name: Generate Docs | |
run: | | |
chmod +x prepare-docs.sh | |
./prepare-docs.sh | |
shell: bash | |
- name: Install dependencies | |
working-directory: website | |
run: npm ci | |
- name: Build Website | |
working-directory: website | |
run: npm run build | |
publish-test: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 8 | |
cache: 'gradle' | |
- name: Prepare distribution | |
run: | | |
./gradlew shadowJar | |
mkdir dist | |
mv build/libs/crowdin-cli-*.jar dist/crowdin-cli.jar | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install the latest version of the npm CLI | |
run: npm install -g npm@latest | |
- name: Build and install the package | |
run: | | |
sudo npm install --location=global [email protected] | |
npm install | |
jdeploy install | |
- name: Test crowdin command | |
run: crowdin -V |