From 8713a41f285a53bb5072bfd01486ba57a1e9abbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Wed, 5 Jan 2022 08:28:31 +0100 Subject: [PATCH] Bump actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- .github/workflows/lint-eslint.yml | 44 +++++++++++++ .github/workflows/lint-info-xml.yml | 31 +++++++++ .github/workflows/lint-php-cs.yml | 35 ++++++++++ .github/workflows/lint-php.yml | 35 ++++++++++ .github/workflows/lint-stylelint.yml | 44 +++++++++++++ .github/workflows/lint.yml | 98 ---------------------------- 6 files changed, 189 insertions(+), 98 deletions(-) create mode 100644 .github/workflows/lint-eslint.yml create mode 100644 .github/workflows/lint-info-xml.yml create mode 100644 .github/workflows/lint-php-cs.yml create mode 100644 .github/workflows/lint-php.yml create mode 100644 .github/workflows/lint-stylelint.yml delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml new file mode 100644 index 00000000..11590ffb --- /dev/null +++ b/.github/workflows/lint-eslint.yml @@ -0,0 +1,44 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - master + - stable* + +jobs: + lint: + runs-on: ubuntu-latest + + name: eslint + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.1 + id: versions + with: + fallbackNode: '^12' + fallbackNpm: '^6' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@v2 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml new file mode 100644 index 00000000..cea2a2bc --- /dev/null +++ b/.github/workflows/lint-info-xml.yml @@ -0,0 +1,31 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - master + - stable* + +jobs: + xml-linters: + runs-on: ubuntu-latest + + name: info.xml lint + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Download schema + run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd + + - name: Lint info.xml + uses: ChristophWurst/xmllint-action@v1 + with: + xml-file: ./appinfo/info.xml + xml-schema-file: ./info.xsd diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml new file mode 100644 index 00000000..9aad5140 --- /dev/null +++ b/.github/workflows/lint-php-cs.yml @@ -0,0 +1,35 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - master + - stable* + +jobs: + lint: + runs-on: ubuntu-latest + + name: php-cs + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: "7.4" + coverage: none + + - name: Install dependencies + run: composer i + + - name: Lint + run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml new file mode 100644 index 00000000..3e8bac9b --- /dev/null +++ b/.github/workflows/lint-php.yml @@ -0,0 +1,35 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - master + - stable* + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ["7.3", "7.4", "8.0"] + + name: php + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: none + + - name: Lint + run: composer run lint diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml new file mode 100644 index 00000000..64edcfba --- /dev/null +++ b/.github/workflows/lint-stylelint.yml @@ -0,0 +1,44 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: + pull_request: + push: + branches: + - master + - stable* + +jobs: + lint: + runs-on: ubuntu-latest + + name: stylelint + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.1 + id: versions + with: + fallbackNode: '^12' + fallbackNpm: '^6' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@v2 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run stylelint diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 502c0412..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Lint - -on: - pull_request: - push: - branches: - - master - - stable* - -jobs: - php: - runs-on: ubuntu-latest - - strategy: - matrix: - php-versions: ["7.3", "7.4", "8.0"] - - name: php${{ matrix.php-versions }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - coverage: none - - - name: Lint - run: composer run lint - - php-cs-fixer: - runs-on: ubuntu-latest - - strategy: - matrix: - php-versions: ["7.4"] - - name: cs php${{ matrix.php-versions }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up php - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - coverage: none - - - name: Install dependencies - run: composer i - - - name: Run coding standards check - run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) - - node: - runs-on: ubuntu-latest - - name: eslint node - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up node - uses: actions/setup-node@v2 - with: - node-version: 14 - - - name: Set up npm7 - run: npm i -g npm@7 - - - name: Install dependencies - run: npm ci - - - name: Lint - run: npm run lint - - stylelint: - runs-on: ubuntu-latest - - name: stylelint node - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up node - uses: actions/setup-node@v2 - with: - node-version: 14 - - - name: Set up npm7 - run: npm i -g npm@7 - - - name: Install dependencies - run: npm ci - - - name: Lint - run: npm run stylelint