From ef2cdb3d07c9bb8c283daf7e2da539b2a71d9403 Mon Sep 17 00:00:00 2001 From: 123joshuawu Date: Tue, 27 Oct 2020 16:45:25 -0400 Subject: [PATCH 1/2] remove cypress and coverage from ci --- .github/workflows/ci.yaml | 234 +++++++++++++++++++------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5091f93d7..1bc00a55a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,125 +57,125 @@ jobs: PGPORT: ${{ job.services.postgres.ports[5432] }} PGUSER: postgres PGPASSWORD: postgres - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | bash scripts/test.sh - bash <(curl -s https://codecov.io/bash) - - cypress: - name: Run integration tests using cypress - runs-on: ubuntu-latest - - services: - postgres: - image: postgres - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: yacs - ports: - - 5432/tcp - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - uses: actions/checkout@v2 - - - name: Setup database - working-directory: src/data - env: - PGHOST: localhost - PGPORT: ${{ job.services.postgres.ports[5432] }} - PGUSER: postgres - PGPASSWORD: postgres - run: | - bash build.sh - - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Update pip - run: python -m pip install --upgrade pip - - - name: Load cache for pip - uses: actions/cache@v1 - with: - path: ~/.cache/pip - key: | - ${{ runner.os }}-backend-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-backend-pip- - - - name: Install dependencies - run: pip install -r src/api/requirements.txt - - - name: Start API - working-directory: src/api - env: - DB_USER: postgres - DB_PASS: postgres - DB_PORT: ${{ job.services.postgres.ports[5432] }} - run: | - python app.py & - curl \ - --retry 5 \ - --retry-delay 1 \ - --retry-connrefused \ - http://localhost:5000 - - - name: Start web - working-directory: src/web - run: | - npm ci - npm run serve:test & - - - name: Seed test data - working-directory: rpi_data - run: | - function load_semester() { - curl \ - --location \ - --request POST \ - 'http://localhost:8080/api/bulkCourseUpload' \ - --form "file=@$1" \ - --form 'isPubliclyVisible=true' \ - --max-time 60 \ - -v - } - load_semester "summer-2020.csv" - load_semester "fall-2020.csv" - - - name: Run cypress - uses: cypress-io/github-action@v2 - with: - working-directory: tests/integration - wait-on: "http://localhost:8080" - - - uses: actions/upload-artifact@v1 - if: failure() - with: - name: cypress-screenshots - path: tests/integration/cypress/screenshots - # Test run video was always captured, so this action uses "always()" condition - - uses: actions/upload-artifact@v1 - if: always() - with: - name: cypress-videos - path: tests/integration/cypress/videos - - - uses: actions/upload-artifact@v1 - with: - name: nyc-report - path: tests/integration/coverage/lcov-report - - - name: Upload coverage - working-directory: tests/integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - run: | - npm run report-coverage - bash <(curl -s https://codecov.io/bash) + # bash <(curl -s https://codecov.io/bash) + + # cypress: + # name: Run integration tests using cypress + # runs-on: ubuntu-latest + + # services: + # postgres: + # image: postgres + # env: + # POSTGRES_USER: postgres + # POSTGRES_PASSWORD: postgres + # POSTGRES_DB: yacs + # ports: + # - 5432/tcp + # options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + # steps: + # - uses: actions/checkout@v2 + + # - name: Setup database + # working-directory: src/data + # env: + # PGHOST: localhost + # PGPORT: ${{ job.services.postgres.ports[5432] }} + # PGUSER: postgres + # PGPASSWORD: postgres + # run: | + # bash build.sh + + # - name: Set up Python 3.8 + # uses: actions/setup-python@v1 + # with: + # python-version: 3.8 + + # - name: Update pip + # run: python -m pip install --upgrade pip + + # - name: Load cache for pip + # uses: actions/cache@v1 + # with: + # path: ~/.cache/pip + # key: | + # ${{ runner.os }}-backend-pip-${{ hashFiles('**/requirements.txt') }} + # restore-keys: | + # ${{ runner.os }}-backend-pip- + + # - name: Install dependencies + # run: pip install -r src/api/requirements.txt + + # - name: Start API + # working-directory: src/api + # env: + # DB_USER: postgres + # DB_PASS: postgres + # DB_PORT: ${{ job.services.postgres.ports[5432] }} + # run: | + # python app.py & + # curl \ + # --retry 5 \ + # --retry-delay 1 \ + # --retry-connrefused \ + # http://localhost:5000 + + # - name: Start web + # working-directory: src/web + # run: | + # npm ci + # npm run serve:test & + + # - name: Seed test data + # working-directory: rpi_data + # run: | + # function load_semester() { + # curl \ + # --location \ + # --request POST \ + # 'http://localhost:8080/api/bulkCourseUpload' \ + # --form "file=@$1" \ + # --form 'isPubliclyVisible=true' \ + # --max-time 60 \ + # -v + # } + # load_semester "summer-2020.csv" + # load_semester "fall-2020.csv" + + # - name: Run cypress + # uses: cypress-io/github-action@v2 + # with: + # working-directory: tests/integration + # wait-on: "http://localhost:8080" + + # - uses: actions/upload-artifact@v1 + # if: failure() + # with: + # name: cypress-screenshots + # path: tests/integration/cypress/screenshots + # # Test run video was always captured, so this action uses "always()" condition + # - uses: actions/upload-artifact@v1 + # if: always() + # with: + # name: cypress-videos + # path: tests/integration/cypress/videos + + # - uses: actions/upload-artifact@v1 + # with: + # name: nyc-report + # path: tests/integration/coverage/lcov-report + + # - name: Upload coverage + # working-directory: tests/integration + # env: + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # run: | + # npm run report-coverage + # bash <(curl -s https://codecov.io/bash) test-build: runs-on: ubuntu-latest From 2a5ed4ede19830ed371bcc86a66e65e8edcfecdd Mon Sep 17 00:00:00 2001 From: 123joshuawu Date: Tue, 27 Oct 2020 16:48:45 -0400 Subject: [PATCH 2/2] remove code --- .github/workflows/ci.yaml | 117 -------------------------------------- 1 file changed, 117 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1bc00a55a..0657869c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,125 +57,8 @@ jobs: PGPORT: ${{ job.services.postgres.ports[5432] }} PGUSER: postgres PGPASSWORD: postgres - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | bash scripts/test.sh - # bash <(curl -s https://codecov.io/bash) - - # cypress: - # name: Run integration tests using cypress - # runs-on: ubuntu-latest - - # services: - # postgres: - # image: postgres - # env: - # POSTGRES_USER: postgres - # POSTGRES_PASSWORD: postgres - # POSTGRES_DB: yacs - # ports: - # - 5432/tcp - # options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - # steps: - # - uses: actions/checkout@v2 - - # - name: Setup database - # working-directory: src/data - # env: - # PGHOST: localhost - # PGPORT: ${{ job.services.postgres.ports[5432] }} - # PGUSER: postgres - # PGPASSWORD: postgres - # run: | - # bash build.sh - - # - name: Set up Python 3.8 - # uses: actions/setup-python@v1 - # with: - # python-version: 3.8 - - # - name: Update pip - # run: python -m pip install --upgrade pip - - # - name: Load cache for pip - # uses: actions/cache@v1 - # with: - # path: ~/.cache/pip - # key: | - # ${{ runner.os }}-backend-pip-${{ hashFiles('**/requirements.txt') }} - # restore-keys: | - # ${{ runner.os }}-backend-pip- - - # - name: Install dependencies - # run: pip install -r src/api/requirements.txt - - # - name: Start API - # working-directory: src/api - # env: - # DB_USER: postgres - # DB_PASS: postgres - # DB_PORT: ${{ job.services.postgres.ports[5432] }} - # run: | - # python app.py & - # curl \ - # --retry 5 \ - # --retry-delay 1 \ - # --retry-connrefused \ - # http://localhost:5000 - - # - name: Start web - # working-directory: src/web - # run: | - # npm ci - # npm run serve:test & - - # - name: Seed test data - # working-directory: rpi_data - # run: | - # function load_semester() { - # curl \ - # --location \ - # --request POST \ - # 'http://localhost:8080/api/bulkCourseUpload' \ - # --form "file=@$1" \ - # --form 'isPubliclyVisible=true' \ - # --max-time 60 \ - # -v - # } - # load_semester "summer-2020.csv" - # load_semester "fall-2020.csv" - - # - name: Run cypress - # uses: cypress-io/github-action@v2 - # with: - # working-directory: tests/integration - # wait-on: "http://localhost:8080" - - # - uses: actions/upload-artifact@v1 - # if: failure() - # with: - # name: cypress-screenshots - # path: tests/integration/cypress/screenshots - # # Test run video was always captured, so this action uses "always()" condition - # - uses: actions/upload-artifact@v1 - # if: always() - # with: - # name: cypress-videos - # path: tests/integration/cypress/videos - - # - uses: actions/upload-artifact@v1 - # with: - # name: nyc-report - # path: tests/integration/coverage/lcov-report - - # - name: Upload coverage - # working-directory: tests/integration - # env: - # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - # run: | - # npm run report-coverage - # bash <(curl -s https://codecov.io/bash) test-build: runs-on: ubuntu-latest