Check package setup on real project #10
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: Check package setup on real project | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
workflow_dispatch: | |
jobs: | |
test-setup: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: repository | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup test project | |
run: | | |
npx --yes create-adonisjs --kit web --auth-guard session --db sqlite app | |
- name: Install package | |
run: npm install adonisjsx | |
working-directory: ./app | |
- name: Configure package | |
run: node ace configure adonisjsx | |
working-directory: ./app | |
- name: Setup app | |
run: | | |
cp -f repository/.github/stubs/tsconfig.stub app/tsconfig.json | |
cp -f repository/.github/stubs/routes.stub app/start/routes.ts | |
cp -f repository/.github/stubs/test-server.sh app/test-server.sh | |
chmod +x app/test-server.sh | |
- uses: JarvusInnovations/background-action@v1 | |
name: Setup test server | |
with: | |
run: npm run dev | |
wait-on: | | |
http://localhost:3333 | |
wait-for: 2m | |
log-output-if: failure | |
working-directory: app | |
- name: Check if everything is working | |
run: ./test-server.sh | |
working-directory: ./app |