Files
actions-containers/.gitea/workflows/services.yml
T
tom.coursow 52807694aa
Test Workflow run in Container / test (push) Successful in 8s
Test Gitea Actions with Service Containers / build (push) Has been cancelled
.gitea/workflows/services.yml aktualisiert
2023-07-27 02:08:00 +02:00

52 lines
1.6 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: actionsenvironment
PORT: 8080
jobs:
build:
container:
image: node:latest
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
env:
MONGODB_INITDB_DATABASE: actionsenvironment
MONGODB_INITDB_ROOT_USERNAME: root
MONGODB_INITDB_ROOT_PASSWORD: supersecretpassword
MONGO_INITDB_DATABASE: actionsenvironment
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: supersecretpassword
steps:
- name: Print Debug
run: |
echo ---------------------------------------------
echo "${{ toJSON(gitea) }}"
echo ---------------------------------------------
echo "${{ toJSON(job) }}"
echo ---------------------------------------------
echo "${{ toJSON(runner) }}"
echo ---------------------------------------------
echo "${{ toJSON(steps) }}"
echo ---------------------------------------------
- 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