From 24e1323f8b05e21093fdf104a73c59f28a8ad187 Mon Sep 17 00:00:00 2001
From: Vladimir Ilimurzin <ilimurzin@ya.ru>
Date: Tue, 16 Jul 2024 23:43:59 +0300
Subject: [PATCH] feat: Migrate from Travis to GitHub Actions

---
 .github/workflows/tests.yml | 33 +++++++++++++++++++++++++++++++++
 .travis.yml                 | 25 -------------------------
 README.md                   |  2 +-
 3 files changed, 34 insertions(+), 26 deletions(-)
 create mode 100644 .github/workflows/tests.yml
 delete mode 100644 .travis.yml

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..3bf9442
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,33 @@
+name: Tests
+
+on: [push, pull_request]
+
+jobs:
+  tests:
+    runs-on: ubuntu-20.04
+    strategy:
+      matrix:
+        php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0']
+    steps:
+    - uses: actions/checkout@v4
+
+    - name: Setup GOST engine
+      run: |
+        sudo apt install libengine-gost-openssl1.1
+        sudo bash tests/.configure-gost-openssl.sh
+
+    - name: Setup PHP
+      uses: shivammathur/setup-php@v2
+      with:
+        php-version: ${{ matrix.php-versions }}
+
+    - name: Validate composer.json and composer.lock
+      run: composer validate --strict
+
+    - name: Install dependencies
+      run: composer update --prefer-dist --no-progress
+
+    - name: Run test suite
+      run: |
+        chmod 000 tests/_data/non_readable_file
+        php vendor/codeception/codeception/codecept run
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index b3ec90c..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-dist: bionic
-language: php
-addons:
-  apt:
-    packages:
-    - libengine-gost-openssl1.1
-
-before_install:
-    - sudo bash tests/.configure-gost-openssl.sh
-
-php:
-  - 7.1
-  - 7.2
-  - 7.3
-  - 7.4
-  - 8.0
-
-install:
-  - travis_retry composer self-update
-  - travis_retry composer --version
-  - travis_retry composer update --prefer-dist --no-interaction
-
-script:
-  - chmod 000 tests/_data/non_readable_file
-  - php vendor/codeception/codeception/codecept run
diff --git a/README.md b/README.md
index 29fc10d..51f3083 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 
 # Единая система идентификации и аутентификации (ЕСИА) OpenId 
 
-[![Build Status](https://travis-ci.org/fr05t1k/esia.svg?branch=master)](https://travis-ci.org/fr05t1k/esia)
+[![Build Status](https://github.com/fr05t1k/esia/actions/workflows/tests.yml/badge.svg)](https://github.com/fr05t1k/esia/actions/workflows/tests.yml)
 
 # Описание
 Компонент для авторизации на портале "Госуслуги".