update gh actions reference #58
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: CI | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
android-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew test && ./gradlew copyReports | |
- name: Upload reports | |
uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: Test reports | |
path: "build/uni-outs/report" | |
if-no-files-found: warn | |
android-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew lint && ./gradlew copyReports | |
- name: Upload reports | |
uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: Lint reports | |
path: "build/uni-outs/report" | |
if-no-files-found: warn | |
web-build: | |
runs-on: ubuntu-latest | |
env: | |
WEB_DIR: "lan-web" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Check file existence | |
id: check_files | |
uses: andstor/file-existence-action@v2 | |
with: | |
files: ${{ env.WEB_DIR }} | |
- name: lint | |
if: steps.check_files.outputs.files_exists == 'true' | |
run: | | |
cd $WEB_DIR | |
npm install | |
npm run build | |
web-lint: | |
runs-on: ubuntu-latest | |
env: | |
WEB_DIR: "lan-web" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Check file existence | |
id: check_files | |
uses: andstor/file-existence-action@v2 | |
with: | |
files: ${{ env.WEB_DIR }} | |
- name: lint | |
if: steps.check_files.outputs.files_exists == 'true' | |
run: | | |
cd $WEB_DIR | |
npm install | |
./node_modules/.bin/eslint --ext .js,.jsx,.ts,.tsx,.vue --max-warnings=0 . |