diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e1e0b68 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: [7.0, 8.1] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + tools: composer + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + + - name: Cache yarn deps + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install libsecret-1-dev + yarn install + + - name: Run Tests + run: npm test diff --git a/.prettierignore b/.prettierignore index 662c167..64b05ec 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,4 +4,4 @@ node_modules .vscode .vscode-test *.md -.travis.yml +.github diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 608c4e8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -sudo: required - -language: php -php: - - 7 -addons: - apt: - packages: - - libsecret-1-dev - -before_install: - - if [ $TRAVIS_OS_NAME == "linux" ]; then - export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:99.0; - sh -e /etc/init.d/xvfb start; - sleep 3; - fi - - nvm install 8; - - npm install -g yarn - -cache: - directories: - - node_modules - - $HOME/.yarn-cache - -install: - - yarn install - -script: - - npm test diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ccb88aa..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,28 +0,0 @@ -init: - - git config --global core.autocrlf true -image: Visual Studio 2017 -build: off -platform: x64 -shallow_clone: true -skip_tags: true - -environment: - PHP_VERSION: 7.2.0 - NODE_VERSION: 8 - -install: - - ps: Install-Product node $env:NODE_VERSION - - cinst php -y --version %PHP_VERSION% - - SET PATH=C:\tools\php72;%PATH% - - C:\ProgramData\chocolatey\bin\RefreshEnv - - npm install -g yarn - - cd %APPVEYOR_BUILD_FOLDER% - - yarn install - -test_script: - - cd %APPVEYOR_BUILD_FOLDER% - - npm test - -cache: - - "%LOCALAPPDATA%\\Yarn" - - node_modules -> package.json