Files
actions-containers/.gitea/workflows/services.yml
T
tom.coursow ad94a6ab07
Test Workflow run in Container / test (push) Successful in 9s
Test Gitea Actions with Service Containers / build (push) Has been cancelled
Update .gitea/workflows/services.yml
2023-07-17 20:14:57 +02:00

52 lines
1.5 KiB
YAML

name: Test Gitea Actions with Service Containers
on: push
env:
# Global Env Variables readable in all jobs of this workflow
MONGODB_CLUSTER_ADDRESS: mongodb
MONGODB_USERNAME: root
MONGODB_PASSWORD: supersecretpassword
MONGODB_DB_NAME: actions-environment
PORT: 8080
jobs:
build:
container:
image: node:latest
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: supersecretpassword
mongoexpress:
image: mongo-express:latest
ports:
- 7778:8081
env:
ME_CONFIG_BASICAUTH_USERNAME: basic
ME_CONFIG_BASICAUTH_PASSWORD: supersecretpassword
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: supersecretpassword
ME_CONFIG_MONGODB_SERVER: mongodb
steps:
- name: Print Debug
run: |
echo ---------------------------------------------
echo "${{ gitea }}"
echo ---------------------------------------------
echo "${{ job }}"
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Get Code
uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Run server
run: npm start & npx wait-on http://127.0.0.1:$PORT
- name: Run tests
run: npm test