From ba4e7b88f828c421ad3fb8d13c022e33b1f3fbde Mon Sep 17 00:00:00 2001 From: Lorenzo Battigelli Date: Tue, 6 Aug 2024 19:05:04 -0400 Subject: [PATCH] replace travis pipeline with github pipeline --- .github/workflows/ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 50 ------------------------------- 2 files changed, 64 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..97fede61e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,64 @@ +name: Node.js CI + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 12 + + - name: Cache npm + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Install dependencies + run: | + cd aofl-js-packages + npm install + + - name: Run lint + run: npm run lint + + unit-test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 12 + + - name: Cache npm + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + + - name: Install dependencies + run: | + cd aofl-js-packages + npm install + + - name: Run tests + run: npm test -- --debug diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e4890b8f2..000000000 --- a/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: node_js -node_js: - - "12" -cache: npm -before_install: - - cd aofl-js-packages -install: - - npm i - -jobs: - include: - - stage: lint - name: Lint - script: npm run lint - - - stage: local-unit-test - name: "Unit Test" - addons: - chrome: stable - firefox: latest - script: npm test -- --debug - - - stage: branch-unit-test - name: "Unit Test" - addons: - sauce_connect: true - env: - - secure: "oKFvbx8J3/mNWbCLTK0VVdQJy2YiITeVfcNgwKwprTuxiXi7qddjQKidACMr+Xq45cu5ptVy3NeCKNT+Rc2XIlBVbNhkqV0l8q3ArgnS83ZF+DNHVM5vNi0kkl7qI2rbZqrq5SNXZ+cPI3fVatSzj/fGO6sKmskol4OODex03vsdgBPeNrRxfRFUvhgeLvyItlrxUs7FTRSTDOMK9CAtmGRZtcFA5DfjWwijfijslNMY4RCFnWthDlXKPFx4eXD73T77db4a8zbH5TZLxWM8AvMogmf9XZNvPxKwKoMiyCzX5eNoMzY8aSaIHYK0dkijQ6J6F1/YCtREKLr7G4S51U4IfxsoFXTVTeeCY+W16MGqkyoVwYwtn2GZuHCqhtJb2RUOe5n/2UTaEhL7yKqAvaomB07tM/kh+lWrdrJHkN9deFCb5cOcbMK1vdDkhwYsNuf/peJ9arM9Di8v9FoAHK2ZaA/w4UQAhdyWjbVF4Ph+HgluXlkHvcA+2hIDM/ySUR+3Ndog2p87ZMreqARw1oFmKnQX2+Z7GehRJyVAwLDnHLPGn1baCrTMoUjiYWPOVqHEk9RNR2OzbQnrDGitC43caMnY3e82b7slURHMgOP3ujR+XjE8C7ROmQKR4WD5CKdV18RZALai0HFWfhrbVSx5NbtXSR+8J9Q6K6WjlDk=" - - secure: "QbQjmVcmQQ6jpE6nhKX0IKSCcsYKPwr/v2ujoipB5Sepa7Grt/XCPbE0JGPif/CMMBOQv+ydmawzcycIZUFVdy5gjkEec7RNQjuH5FWGIopQ0509s0NklP498qWUrS5a3f4Ukhq4gzMIV5EQWlLrPE3KCWc3K/rcqWDlq6O+1/IjhrCXnCL3bhsnNC9SUcVBdVI48OAp0f8ZgRCk4+1uBTSh1VyPu0Z5WlAlknbW+/kn8MAIebunQvuihMCUfOYJaYwe0NpQ1diddsp7y/Poso96zac9RYjvLK2qHgrZwMeKW9/BI3jOFMMgWHU4PWabIhfnWuqddsLdBVNLTLIrSSIelheH4V/4pFLYe6ivG9bZQmXp6ah7Fz06dI8dEN5I0qNQ/uhtB+O1wChzSZCaytrFq/Xrs/Az5hZdxzTyTjkoNxECQ84SKsewH2tq9XK32wgbIYAJg6TiC1fBBqY3iI7hQgdHc4OYBX00+sf3LiY7zS58KxuGG1To4zEnLSAReH0Bybt+WGDMBU0sNmpZo2+vzdPxPOXG4rAHIcIogNeSje9ipbgo5bEi4UushK/eYi2r4faQoGuyNXUKCCcLFZ+FJvIWd7tT85CPaB/6r2n8lC0AY364x4XYC0VA7pjuZsoGs/OudGn64zaWQTBloXWM3WfTYX0DLMIeZvrDRyY=" - script: JOB_ID=$TRAVIS_BUILD_NUMBER npm run test:sl - - - stage: master-unit-test - name: "Unit Test" - addons: - sauce_connect: true - env: - - secure: "G3aoIiZY4vJrxPs3u69ZFFfatozB/RCpljqDdObGCdWvvTg2Y0TBwqTYYxnQiHKqcagQ52FT+VlIWgg93dAbcdhWg/zDJJIVm9LrFT8SFWhKEA5oYlkZ8iLXPQdXE+UmkUGsGVDFZen787MkC0b0GFYi1gKn0LgxjKI/9gsoaZ9jdfeCGJhlWzBG/kjeuRs2nih6ai2tRY3uGwhYunFvL8UdTFbD3ATfyus4YjV/zLOHPcYaWeZPkGtkDnAL0/P6zW9/T7u3M362opvoLhl0BXV1wy/OmsH6s6dLCvQMg96H5YrYrYOado6XRY9QFBlwmL6mIcJx7BOj07QqocFG3VeoSr1vV05S9Kxsh5jMGmIIijsOX5mNTtTWheJbPfqPzU1VP0pPz+ERLAYywnMP4zs0yxhU9rDA0e1/XDdr+R18U6oCajTVgQ+/eMBG5pHw8JeuaEhUJYv5P30db4ZUOEhP0R6qIkL7jXQdatrTkHIPWS/ck6gVFFlotvLuJQBnmTo5oHVIUCSyHXE9TtdbNSgl1E1Gy+ExaaYvBxm9CMXmhg393ugEIcTR6PdaIDXfdH0GmWZ/09+qkGIohjJ/kvqImQPMYh1g1zwEsmPfWHVuMwyMB79CLDnEgyEcJFySyIYoIWO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3SBRdKcsJD6ls7ilF3gK0wINTa/Yrw2jSu8GF6ZN6t3izmrc3x2qdaRO3IkSXPwqPIxk0K0BCpOT4MVDFfVyqLEuZK9xSAj8PFT8WFusv3Q3QVEAQyUzxnr1Scj9P/28bCiEEtHtpNLt7jGMoguTKJXAA6vA2kVncAFMoOMQ/E3f7MWjvqo+1ktLp++ymwZUS+PJEPmSKjtDsLKv0I6LzquAnfXWw5frWxnRQI4CbAZpBu/Q2hYt+O98y4sts6X67R6kkZGCSa5XkSaljvYdaBQinhhsxEBqjjA1JNbfbdD/1UV4dhvOtJ0EukG5PndaVo51gQjpkCUtIq62qZ1T1PDAok=" - script: JOB_ID=$TRAVIS_BUILD_NUMBER npm run test:sl && npx codecov -f ./logs/coverage/lcov.info - -stages: - - lint - - name: local-unit-test - if: fork = true - - name: branch-unit-test - if: (fork = false) AND (branch != master) - - name: master-unit-test - if: (fork = false) AND (branch = master) -