Bump next from 15.0.3 to 15.1.3 in /packages/nextjs #188
Workflow file for this run
This file contains 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: Test Scratch Auth Next.js Package | |
on: | |
push: | |
paths: | |
- "packages/nextjs/**" | |
pull_request: | |
paths: | |
- "packages/nextjs/**" | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
SCRATCH_AUTH_SECRET_KEY: ${{ secrets.SCRATCH_AUTH_SECRET_KEY }} | |
NEXT_PUBLIC_REDIRECT_URL: "http://localhost:3000/api/auth" | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Log in to Docker Hub | |
run: | | |
echo "DOCKER_USERNAME: $DOCKER_USERNAME" # ここではUSERNAMEを確認 | |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install dependencies for test package | |
working-directory: test/nextjs | |
run: npm install | |
- name: NPM Link for test package | |
working-directory: packages/nextjs | |
run: npm link | |
- name: Install dependencies & @scratch-auth/nextjs for test package | |
working-directory: test/nextjs | |
run: | | |
npm install && npm link @scratch-auth/nextjs | |
- name: Install wait-on | |
run: npm install -g wait-on | |
- name: Start the Next.js application | |
working-directory: test/nextjs | |
run: npm run dev & | |
- name: Wait for server to be ready (using curl) | |
run: | | |
echo "Waiting for the server to be ready..." | |
for i in {1..10}; do | |
if curl --silent --fail http://localhost:3000; then | |
echo "Server is ready!" | |
break | |
fi | |
echo "Waiting for the server... (Attempt $i)" | |
sleep 5 | |
done | |
- name: Stop services | |
run: | | |
kill $(lsof -t -i:3000) || true | |
if: always() | |
- name: Upload test results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nextjs-scratch-auth-test-results | |
path: packages/nextjs/test-results |