Skip to content

Commit

Permalink
test pr 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Watercolours committed Dec 4, 2024
1 parent 425446f commit b0ffac8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 16 deletions.
48 changes: 33 additions & 15 deletions .github/workflows/.test.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
name: .build-backend.yaml
name: .test.yaml

on:
workflow_call:

jobs:
verify-pull-request:
name: Verify pull request
determine-project-type:
name: Determine project type
runs-on: ubuntu-latest-8-cores
outputs:
type: ${{ steps.verify-type.outputs.type }}
type: ${{ steps.determine.outputs.type }}
steps:
- id: verify-type
- name: Checkout code
uses: actions/checkout@v4
- id: determine
working-directory: apps/${{ github.workflow }}
run: |
[ -f "package.json" ] && echo "type=frontend" || echo "type=backend" >> "$GITHUB_OUTPUT"
if [ -f "package.json" ]; then
echo "type=frontend" >> "$GITHUB_OUTPUT"
else
echo "type=backend" >> "$GITHUB_OUTPUT"
fi
test-backend:
if: needs.verify-pull-request.outputs.type == 'backend'
name: Verify pull request (backend)
name: Verify pull request
if: needs.determine-project-type.outputs.type == 'backend'
needs: [determine-project-type]
runs-on: ubuntu-latest-8-cores
timeout-minutes: 10
steps:
Expand All @@ -35,8 +43,9 @@ jobs:
run: ./gradlew :apps:${{ github.workflow }}:test --stacktrace --configuration-cache

test-frontend:
if: needs.verify-pull-request.outputs.type == 'frontend'
name: Verify pull request (frontend)
name: Verify pull request
if: needs.determine-project-type.outputs.type == 'frontend'
needs: [determine-project-type]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -46,13 +55,22 @@ jobs:
with:
node-version: '20.x'
cache: 'yarn'
cache-dependency-path: apps/${{ env.APP_NAME }}/client/yarn.lock
cache-dependency-path: apps/${{ github.workflow }}/client/yarn.lock
- name: Install client
working-directory: apps/${{ env.APP_NAME }}
working-directory: apps/${{ github.workflow }}
run: yarn --cwd client install --frozen-lockfile && yarn --cwd client build
- name: Install server
working-directory: apps/${{ env.APP_NAME }}
working-directory: apps/${{ github.workflow }}
run: yarn --cwd server install --frozen-lockfile && yarn --cwd server build
- name: Run tests
working-directory: apps/${{ env.APP_NAME }}/client
run: CI=true yarn test
working-directory: apps/${{ github.workflow }}/client
run: CI=true yarn test

# pull-request-verified:
# name: Verification success
# if: ${{ !failure() }}
# needs: [test-frontend, test-backend]
# runs-on: ubuntu-latest
# steps:
# - name: Success
# run: echo "SUCCESS"
2 changes: 1 addition & 1 deletion apps/etterlatte-saksbehandling-ui/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Unleashcontext, useUnleash } from '~useUnleash'

initAmplitude()

// test pr
// test pr 2

function App() {
const innloggetbrukerHentet = useHentInnloggetSaksbehandler()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ data class TilbakekrevingHendelse(
val type: TilbakekrevingHendelseType,
val jmsTimestamp: Tidspunkt? = null,
)
// bare en liten endring


enum class TilbakekrevingHendelseStatus {
NY,
Expand Down

0 comments on commit b0ffac8

Please sign in to comment.