4minitz/4minitz

View on GitHub
.github/workflows/run_tests.yml

Summary

Maintainability
Test Coverage
name: 4Minitz CI TestRunner
on: [push, pull_request]

jobs:
  UnitTestsAndI18n:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v1
      with:
        node-version: '8.11.4'
    - run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
    - run: sudo apt-get install gcc-4.8 -y --option Acquire::Retries=100 --option Acquire::http::Timeout="300"
    - run: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
    - run: curl https://install.meteor.com | /bin/sh
    - run: pwd
    - run: meteor --version
    - run: npm install

    - run: npm run test:unit
    - run: npm run test:i18n


  End2EndTests:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true   # When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true
      matrix:   # max. 20 concurrent jobs https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#usage-limits
        e2etest:
          - tests/end2end/MeetingSeries-test.js
          - tests/end2end/MeetingSeriesEdit-test.js
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: '8.11.4'

      - run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
      - run: sudo apt-get install gcc-4.8 -y --option Acquire::Retries=100 --option Acquire::http::Timeout="300"
      - run: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
      - run: curl https://install.meteor.com | /bin/sh
      - run: pwd
      - run: meteor --version
      - run: google-chrome --version
      - run: npm install
      - uses: actions/setup-node@v1
        with:
          node-version: '12.16.2'         # chromedriver needs node v12 to install!
      - run: npm i chromedriver@^84.0.0
      - run: ./node_modules/chromedriver/bin/chromedriver --version

      - uses: actions/setup-node@v1
        with:
          node-version: '8.11.4'           # switch back to meteors node v8
      - run: ./tests/run_e2e.sh ${{ matrix.e2etest }}


      - name: Upload E2E screenshot artifacts
        if: always()
        uses: actions/upload-artifact@v1
        with:
          name: E2E Screenshots
          path: tests/snapshots
      - name: Upload E2E log artifacts
        if: always()
        uses: actions/upload-artifact@v1
        with:
          name: E2E Logs
          path: tests/end2end/logs
      - name: Upload E2E MongoDB artifacts
        if: always()
        uses: actions/upload-artifact@v1
        with:
          name: E2E Mongodump
          path: tests/mongodump