diff --git a/.github/workflows/setting.yaml b/.github/workflows/setting.yaml new file mode 100644 index 0000000..f99aebe --- /dev/null +++ b/.github/workflows/setting.yaml @@ -0,0 +1,45 @@ +name: pull request + +on: + pull_request: + branches: [main] + +jobs: + builds: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + tags: | + encx/agoda-ci-workshop-2022:1.0.${{ github.run_id }}-alpha + + test: + runs-on: ubuntu-latest + needs: builds + services: + our_website: + image: encx/agoda-ci-workshop-2022:1.0.${{ github.run_id }}-alpha + ports: + - 3000:3000 + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 16 + uses: actions/setup-node@v3 + with: + node-version: 16.x + - run: yarn + - run: npx playwright install chromium + - run: yarn test:e2e + + + diff --git a/db/fakedb.ts b/db/fakedb.ts index 9afe211..f90d3ee 100644 --- a/db/fakedb.ts +++ b/db/fakedb.ts @@ -189,6 +189,16 @@ export const PropertyDb: PropertySearchResult[] = [ additional_label: 'I am world champion now', free_cancellation: true, }, + { + name: 'Test Apartment', + image: '/trump.jpg', + score: 9, + price: 9999, + discount: 50, + nbr_of_reviews: 20, + additional_label: 'ONLY 2 LEFT', + free_cancellation: true, + }, { name: 'Freshman and Master Hotel', image: '/desk.jpg',