From 5cb2d0e0612aafb75f594b83e614f96012691de4 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 6 May 2025 11:25:56 +1000 Subject: [PATCH] Remove defunct Mapi workflow A contributor added this workflow to promote their service. But we never found a use for it and at some point it broke because we didn't update it. It has been disabled for two years now. Let's clean it up. --- .github/workflows/mapi.yml | 51 -------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/mapi.yml diff --git a/.github/workflows/mapi.yml b/.github/workflows/mapi.yml deleted file mode 100644 index aab701947b..0000000000 --- a/.github/workflows/mapi.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: 'Mayhem for API' -on: workflow_dispatch -permissions: - contents: read # to fetch code (actions/checkout) -jobs: - test: - permissions: - contents: read # to fetch code (actions/checkout) - security-events: write # to upload SARIF results (github/codeql-action/upload-sarif) - if: ${{ github.repository_owner == 'openfoodfoundation' }} - runs-on: ubuntu-latest - strategy: - fail-fast: true - steps: - - uses: actions/checkout@v3 - - run: docker/build - - run: docker compose up --detach - - run: until curl -f -s http://localhost:3000; do echo "waiting for api server"; sleep 1; done - - run: docker compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="update spree_users set spree_api_key='testing' where login='ofn@example.com'" - # equivalent to Flipper.enable(:api_v1) - - run: docker compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="insert into flipper_features (key, created_at, updated_at) values ('api_v1', localtimestamp, localtimestamp)" - - run: docker compose exec -T db psql postgresql://ofn:f00d@localhost:5432/open_food_network_dev --command="insert into flipper_gates (feature_key, key, value, created_at, updated_at) values ('api_v1', 'boolean', 'true', localtimestamp, localtimestamp)" - - # Run Mayhem for API - - name: Run Mayhem for API - uses: ForAllSecure/mapi-action@v1 - continue-on-error: true - with: - mapi-token: ${{ secrets.MAPI_TOKEN }} - api-url: http://localhost:3000 - api-spec: swagger/v1.yaml - target: openfoodfoundation/openfoodnetwork - duration: 1min - sarif-report: mapi.sarif - html-report: mapi.html - run-args: | - --header-auth - X-Api-Token: testing - - # Archive HTML report - - name: Archive Mayhem for API report - uses: actions/upload-artifact@v3 - with: - name: mapi-report - path: mapi.html - - # Upload SARIF file (only available on public repos or github enterprise) - - name: Upload SARIF file - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: mapi.sarif