diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..09f26ec --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: ci + +on: [push, pull_request] + +jobs: + tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Set Yarn 3 as package manager + run: | + corepack enable yarn + corepack prepare yarn@stable --activate + + - name: Install Yarn dependencies + run: yarn install --no-immutable + + - name: JavaScript linting + run: yarn lint + + package: + if: github.ref == 'refs/heads/master' && github.event_name == 'push' + needs: tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Git Subsplit + run: | + wget https://raw.githubusercontent.com/dflydev/git-subsplit/2cde593a10acdb3fcafd2136ee7025fee9e925b2/git-subsplit.sh + chmod +x git-subsplit.sh + + - name: Setup SSH Agent + if: ${{ inputs.ssh-private-key }} + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.EXOLNET_PHPCS_CONFIG_SSH_DEPLOY_KEY }} + + - name: Publish phpcs-config + run: | + ./git-subsplit.sh init ${{ github.repositoryUrl }} + ./git-subsplit.sh publish --heads="master" --no-tags packages/phpcs-config:git@github.com:exolnet/phpcs-config.git diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a3e4bf7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js - -node_js: - - '8' - - '10' - -sudo: false - -cache: - directories: - - $HOME/.npm - - node_modules - -before_install: - - travis_retry npm install -g npm@latest - -script: - - npm run lint diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 38a01b2..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,18 +0,0 @@ -@Library('eXolnet') _ - -wrappedPipeline { - wrappedNode(cleanWorkspace: true) { - testConditions(branch: "master") { - stage('Packaging') { - sh 'wget https://raw.githubusercontent.com/dflydev/git-subsplit/2cde593a10acdb3fcafd2136ee7025fee9e925b2/git-subsplit.sh' - sh 'chmod +x git-subsplit.sh' - - // exolnet-bot - sshagent (credentials: ['global--github--exolnet-bot--ssh']) { - sh './git-subsplit.sh init git@github.com:eXolnet/code-quality-tools.git' - sh './git-subsplit.sh publish --heads="master" --no-tags packages/phpcs-config:git@github.com:exolnet/phpcs-config.git' - } - } - } - } -} diff --git a/README.md b/README.md index 81aec5f..5576b61 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # eXolnet - Code Quality Tools [![Software License](https://img.shields.io/badge/license-MIT-8469ad.svg?style=flat-square)](LICENSE.md) -[![Build Status](https://img.shields.io/travis/eXolnet/code-quality-tools/master.svg?style=flat-square)](https://travis-ci.org/eXolnet/code-quality-tools) +[![Build Status](https://img.shields.io/github/actions/workflow/status/eXolnet/code-quality-tools/ci.yml?label=tests&style=flat-square)](https://github.com/eXolnet/code-quality-tools/actions?query=workflow%3Aci) A collection of shareable configurations for various coding-style tools to make the configurations consistent across our projects. + ## Available configurations |Tool|Package|Version|Description|