Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewgdewar committed Jan 28, 2025
1 parent 94d6d3c commit fe761a7
Show file tree
Hide file tree
Showing 4 changed files with 573 additions and 576 deletions.
137 changes: 65 additions & 72 deletions .github/workflows/content-sources-actions.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
name: build-test

on:
push:
branches:
- main

paths-ignore:
- "**.md"

pull_request:
paths-ignore:
- "**.md"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: build-test-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
playwright-api-test:
playwright-tests:
runs-on:
- codebuild-content-services-backend-repo-${{ github.run_id }}-${{ github.run_attempt }}
- instance-size:small
- buildspec-override:true

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get current PR URL
id: get-pr-url
Expand All @@ -29,82 +34,70 @@ jobs:
pr_url=$(jq -r '.pull_request.html_url' < "$GITHUB_EVENT_PATH")
echo "Pull Request URL: $pr_url"
# Set the PR URL as an output
echo "::set-output name=pr_url::$pr_url"
echo "pr_url=$pr_url" >> $GITHUB_OUTPUT
- name: Get appropriate front-end branch
run: |
chmod +x .github/workflowScripts/getFrontendRepo.sh
.github/workflowScripts/getFrontendRepo.sh "${{ steps.get-pr-url.outputs.pr_url }}"
# - name: Run get_go_version.sh script
# id: get-go-version
# run: |
# chmod +x ./scripts/get_go_version.sh
# GO_VERSION=$(./scripts/get_go_version.sh ./go.mod)
# echo "::set-output name=go-version::$GO_VERSION"

# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: "${{ steps.get-go-version.outputs.go-version }}"

# - name: Set up Make
# run: |
# sudo apt-get install make

# - name: Copy the example config
# run: |
# cp ./configs/config.yaml.example ./configs/config.yaml

# - name: Create .env file
# working-directory: _playwright-tests
# run: |
# echo "BASE_URL=http://127.0.0.1:8000" >> .env
# echo "TOKEN=apple" >> .env
# echo "CI=true" >> .env

# - name: Backend compose-up
# run: make compose-up

# - name: Backend run
# run: make run &

# - name: Set up Node.js
# uses: actions/setup-node@v2
# with:
# node-version-file: "_playwright-tests/.nvmrc"

# - name: Install playwright and dependencies
# working-directory: _playwright-tests
# run: yarn install

# - name: Install Playwright Browsers
# working-directory: _playwright-tests
# run: yarn playwright install --with-deps

# - name: Run Playwright tests
# working-directory: _playwright-tests
# run: yarn playwright test

# - name: Publish Test Report
# uses: ctrf-io/github-test-reporter@v1
# with:
# report-path: "./_playwright-tests/playwright-ctrf/playwright-ctrf.json"
# if: always()

# - name: Store report
# uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: playwright-ctrf
# path: ./_playwright-tests/playwright-ctrf
# retention-days: 10
# - name: Run get_go_version.sh script
# id: get-go-version
# run: |
# chmod +x ./scripts/get_go_version.sh
# GO_VERSION=$(./scripts/get_go_version.sh ./go.mod)
# echo "::set-output name=go-version::$GO_VERSION"
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version: "${{ steps.get-go-version.outputs.go-version }}"
# - name: Set up Make
# run: |
# sudo apt-get install make
# - name: Copy the example config
# run: |
# cp ./configs/config.yaml.example ./configs/config.yaml
# - name: Create .env file
# working-directory: _playwright-tests
# run: |
# echo "BASE_URL=http://127.0.0.1:8000" >> .env
# echo "TOKEN=apple" >> .env
# echo "CI=true" >> .env
# - name: Backend compose-up
# run: make compose-up
# - name: Backend run
# run: make run &
# - name: Set up Node.js
# uses: actions/setup-node@v2
# with:
# node-version-file: "_playwright-tests/.nvmrc"
# - name: Install playwright and dependencies
# working-directory: _playwright-tests
# run: yarn install
# - name: Install Playwright Browsers
# working-directory: _playwright-tests
# run: yarn playwright install --with-deps
# - name: Run Playwright tests
# working-directory: _playwright-tests
# run: yarn playwright test
# - name: Publish Test Report
# uses: ctrf-io/github-test-reporter@v1
# with:
# report-path: "./_playwright-tests/playwright-ctrf/playwright-ctrf.json"
# if: always()
# - name: Store report
# uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: playwright-ctrf
# path: ./_playwright-tests/playwright-ctrf
# retention-days: 10

# openapidiff:
# name: Openapi diff
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v2
# with:
# go-version: "1.23"
Expand All @@ -119,7 +112,7 @@ jobs:
# name: openapi validate
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# - uses: openapi-generators/openapitools-generator-action@v1
# with:
# generator: python
Expand All @@ -129,7 +122,7 @@ jobs:
# name: Lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v2
# with:
# go-version: "1.23"
Expand All @@ -144,7 +137,7 @@ jobs:
# name: Check db migrations
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# - uses: tj-actions/changed-files@v41
# id: files
# - run: |
Expand Down Expand Up @@ -187,7 +180,7 @@ jobs:
# ports:
# - 5433:5432
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# - uses: actions/setup-go@v2
# with:
# go-version: "1.23"
Expand Down
Loading

0 comments on commit fe761a7

Please sign in to comment.