mirror of
https://github.com/dadosfera/maestro.git
synced 2026-08-31 19:58:21 +00:00
38 lines
807 B
YAML
38 lines
807 B
YAML
name: Test
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Configure AWS
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
id: aws
|
|
with:
|
|
aws-region: us-east-1
|
|
|
|
- name: Build
|
|
env:
|
|
APP_NAME: ${{ github.event.repository.name }}
|
|
run: |
|
|
docker build -t $APP_NAME --target test .
|
|
|
|
- name: Run Test
|
|
env:
|
|
ENV: test
|
|
APP_NAME: ${{ github.event.repository.name }}
|
|
run: |
|
|
docker run --rm --entrypoint="npm" $APP_NAME run test
|
|
|
|
- name: Remove Docker's Trash
|
|
if: always()
|
|
run: |
|
|
docker system prune --volumes -a -f
|
|
docker system df
|