Browse Source

Add CI with GitHub Actions (#95)

Switches from TravisCI to using the GitHub actions. The rationale is that this reduces the number of services used.

Also fixes the issue where the chromedriver version did not match the Chrome version.
BentleyJOakes 3 years ago
parent
commit
dbe88c57a0
4 changed files with 37 additions and 21 deletions
  1. 35 0
      .github/workflows/atompm_test.yml
  2. 0 20
      .travis.yml
  3. 1 0
      nightwatch.conf.js
  4. 1 1
      run_tests.sh

+ 35 - 0
.github/workflows/atompm_test.yml

@@ -0,0 +1,35 @@
+name: ATOMPM_CI
+
+on: [push, pull_request]
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    
+    steps:
+    - uses: actions/checkout@v2
+    
+    - name: npm install
+      uses: actions/setup-node@v1
+      with:
+        node-version: 12.x
+        
+    - name: setup chromedriver
+      uses: nanasess/setup-chromedriver@master
+  
+    - name: npm run
+      run: npm ci
+      env:
+        DETECT_CHROMEDRIVER_VERSION: true
+          
+    - name: install igraph
+      run: |
+        sudo apt-get install python3-setuptools
+        pip3 install wheel
+        pip3 install --user python-igraph
+      
+    - name: run tests
+      run: |
+        google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
+        xvfb-run --server-args="-screen 0 2880x1800x24" ./run_tests.sh
+        

+ 0 - 20
.travis.yml

@@ -1,20 +0,0 @@
-language: node_js
-node_js:
- - "node"
-
-cache:
-  directories:
-    - "node_modules"
-    - "$HOME/.cache/pip"
-
-sudo: required
-addons:
-  chrome: stable
- 
-before_script:
- - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
- - pip install --user python-igraph
-    
-script:
- - xvfb-run --server-args="-screen 0 2880x1800x24" ./run_tests.sh
-    

+ 1 - 0
nightwatch.conf.js

@@ -20,6 +20,7 @@ module.exports = {
     "server_path" : selenium_server.path,
     "log_path" : "",
     "port" : 4444,
+    "check_process_delay": 2000,
     "cli_args" : {
       "webdriver.chrome.driver" : chromedriver.path,
       "webdriver.gecko.driver" : "",

+ 1 - 1
run_tests.sh

@@ -18,7 +18,7 @@ fi
 
 #run mt script
 echo "Starting model transformation script..."
-python mt/main.py &
+python3 mt/main.py &
 mtpid=$!
 sleep 3