-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move from Travis to GitHub Actions (#996)
- Loading branch information
Showing
9 changed files
with
69 additions
and
48 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Run Tests | ||
on: | ||
# Triggers the workflow on pull request events but only for the main branch | ||
pull_request: | ||
branches: [ master ] | ||
types: [ opened, synchronize, reopened ] | ||
workflow_dispatch: | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: ['5.6', '7.2', '7.4'] | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
tools: php-cs-fixer | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Install Node packages | ||
run: npm install -g eslint | ||
|
||
- name: Run JS linter (eslint) | ||
run: eslint web/js | ||
|
||
- name: Run PHP linter (php-cs-fixer) | ||
run: vendor/bin/php-cs-fixer --diff --dry-run -v fix | ||
|
||
- name: Run tests | ||
run: | | ||
cp app/config/config.ini-ghactions app/config/config.ini | ||
vendor/atoum/atoum/bin/atoum -d tests/units/ --use-light-report | ||
php tests/functional/api.php | ||
php tests/functional/pages.php |
This file was deleted.
Oops, something went wrong.
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
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
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
16 changes: 7 additions & 9 deletions
16
app/config/config.ini-travis → app/config/config.ini-ghactions
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,29 @@ | ||
[config] | ||
|
||
;TRAVIS_HOME will be replaced by the actual build dir in Travis | ||
|
||
; Path to the data root folder. TMX files will be stored in root/TMX so that | ||
; they could be shared between multiple versions of Transvision | ||
root=TRAVIS_HOME/tests/testfiles/ | ||
root=tests/testfiles/ | ||
|
||
; Path to Git checkout of Transvision, it will contain setup/update scripts | ||
; and the web folder | ||
install=TRAVIS_HOME/ | ||
install=./ | ||
|
||
; Path to configuration files for Transvision | ||
config=TRAVIS_HOME/app/config | ||
config=app/config | ||
|
||
; URL to l10n web service. Wrap the value between quotes if the URL contains special characters like ~ | ||
l10nwebservice = "https://l10n.mozilla-community.org/mozilla-l10n-query/" | ||
l10nwebservice = "https://flod.org/mozilla-l10n-query/mozilla-l10n-query/" | ||
|
||
; Path to the local Mercurial clones, both en-US and l10n. Could be external | ||
; to the Git checkout of Transvision, as long as scripts have access to it. | ||
local_hg=TRAVIS_HOME/data/hg | ||
local_hg=data/hg | ||
|
||
; Path to the local Git clones, both en-US and l10n. Could be external | ||
; to the Git checkout of Transvision, as long as scripts have access to it. | ||
local_git=TRAVIS_HOME/data/git | ||
local_git=data/git | ||
|
||
; This path is used to store libraries (e.g. compare-locales) | ||
libraries=TRAVIS_HOME/data/libraries | ||
libraries=data/libraries | ||
|
||
; Flag to know if we are working in production mode or development mode | ||
dev=true |
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
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
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