[ENG-9703] Feature/add new es8 metrics #13903
Workflow file for this run
This file contains hidden or 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
| name: osf.io | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| env: | |
| WHEELHOUSE: ~/.cache/wheelhouse | |
| ELASTICSEARCH_ARCHIVE: elasticsearch-2.4.5.tar.gz | |
| ELASTICSEARCH6_ARCHIVE: elasticsearch-6.3.1.tar.gz | |
| OSF_DB_PORT: 5432 | |
| OSF_DB_PASSWORD: postgres | |
| GITHUB_ACTIONS: true | |
| jobs: | |
| build-cache: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - id: cache-objects | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache | |
| key: reqs_${{ hashFiles('poetry.lock') }} | |
| restore-keys: reqs | |
| - run: | | |
| mkdir -p ~/.cache/downloads | |
| mkdir -p ~/.cache/pip | |
| mkdir -p ~/.cache/wheelhouse | |
| mkdir -p ~/.cache/testmon | |
| rm -rf node_modules ## TODO remove this later | |
| addons_and_admin: | |
| runs-on: ubuntu-22.04 | |
| needs: build-cache | |
| permissions: | |
| checks: write | |
| services: | |
| elasticsearch8: &ES8_SERVICE | |
| image: elasticsearch:8.19.14 | |
| ports: | |
| - 9202:9200 | |
| env: | |
| discovery.type: single-node | |
| xpack.security.enabled: false | |
| options: >- | |
| --health-cmd "curl -sf http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=30s" | |
| --health-interval 10s | |
| --health-timeout 30s | |
| --health-retries 5 | |
| postgres: &POSTGRES_SERVICE | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: ${{ env.OSF_DB_PASSWORD }} | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps tcp port 5432 on service container to the host | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ./.github/actions/start-build | |
| - name: Run tests | |
| run: poetry run python3 -m invoke test-ci-addons --junit | |
| env: | |
| ELASTIC8_URI: http://localhost:9202 | |
| - name: Upload report | |
| if: (success() || failure()) # run this step even if previous step failed | |
| uses: ./.github/actions/gen-report | |
| website: | |
| runs-on: ubuntu-22.04 | |
| needs: build-cache | |
| permissions: | |
| checks: write | |
| services: | |
| postgres: *POSTGRES_SERVICE | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ./.github/actions/start-build | |
| - name: Run tests | |
| run: poetry run python3 -m invoke test-ci-website --junit | |
| - name: Upload report | |
| if: (success() || failure()) # run this step even if previous step failed | |
| uses: ./.github/actions/gen-report | |
| api1_and_js: | |
| runs-on: ubuntu-22.04 | |
| needs: build-cache | |
| permissions: | |
| checks: write | |
| services: | |
| elasticsearch8: *ES8_SERVICE | |
| postgres: *POSTGRES_SERVICE | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ./.github/actions/start-build | |
| - name: NVM & yarn install | |
| run: poetry run python3 -m invoke assets --dev | |
| - name: Run test | |
| run: poetry run python3 -m invoke test-ci-api1-and-js --junit | |
| env: | |
| ELASTIC8_URI: http://localhost:9202 | |
| - name: Upload report | |
| if: (success() || failure()) # run this step even if previous step failed | |
| uses: ./.github/actions/gen-report | |
| api2: | |
| runs-on: ubuntu-22.04 | |
| needs: build-cache | |
| permissions: | |
| checks: write | |
| services: | |
| elasticsearch8: *ES8_SERVICE | |
| postgres: *POSTGRES_SERVICE | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ./.github/actions/start-build | |
| - name: Wait for Elasticsearch | |
| run: | | |
| echo "Waiting for ES8 health..." | |
| sleep 5 | |
| until curl -sf http://localhost:9202/_cluster/health?wait_for_status=yellow; do | |
| echo "ES8 not ready yet..." | |
| sleep 5 | |
| done | |
| echo "ES8 started successfully!" | |
| - name: Run tests | |
| run: poetry run python3 -m invoke test-ci-api2 --junit | |
| env: | |
| ELASTIC8_URI: http://localhost:9202 | |
| - name: Upload report | |
| if: (success() || failure()) # run this step even if previous step failed | |
| uses: ./.github/actions/gen-report | |
| api3_and_osf: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| needs: build-cache | |
| services: | |
| postgres: *POSTGRES_SERVICE | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ./.github/actions/start-build | |
| - name: Run tests | |
| run: poetry run python3 -m invoke test-ci-api3-and-osf --junit | |
| - name: Upload report | |
| if: (success() || failure()) # run this step even if previous step failed | |
| uses: ./.github/actions/gen-report | |
| mailhog: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| needs: build-cache | |
| services: | |
| postgres: *POSTGRES_SERVICE | |
| mailhog: | |
| image: mailhog/mailhog | |
| ports: | |
| - 1025:1025 | |
| - 8025:8025 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ./.github/actions/start-build | |
| - name: Run tests | |
| run: poetry run python3 -m invoke test-ci-mailhog -n 1 --junit | |
| - name: Upload report | |
| if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed | |
| uses: ./.github/actions/gen-report | |
| scripts: | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| checks: write | |
| needs: build-cache | |
| services: | |
| postgres: *POSTGRES_SERVICE | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: ./.github/actions/start-build | |
| - name: Run tests | |
| run: poetry run python3 -m invoke test-ci-scripts -n 1 --junit | |
| - name: Upload report | |
| if: (github.event_name != 'pull_request') && (success() || failure()) # run this step even if previous step failed | |
| uses: ./.github/actions/gen-report |