OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/.github/workflows/test-core.yml

86 lines
2.5 KiB

name: Core/Test
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests
on:
push:
branches:
- dev
- release/*
paths-ignore:
- 'docs/**'
- 'help/**'
pull_request:
types: [opened, reopened, synchronize]
paths-ignore:
- 'docs/**'
- 'help/**'
jobs:
danger:
if: github.repository == 'opf/openproject'
runs-on: [ubuntu-latest]
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- uses: danger/danger@master
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
units:
name: Units
if: github.repository == 'opf/openproject'
runs-on: [self-hosted-autoscale]
timeout-minutes: 30
env:
CI_CACHE_PATH: "/tmp/cache"
CI_RETRY_COUNT: 3
LOCAL_DEV_CHECK: 1
steps:
- uses: actions/checkout@v2
- name: cache
uses: actions/cache@v2
with:
path: /tmp/cache
key: ${{ runner.os }}-core-tests-units-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-core-tests-units-
${{ runner.os }}-core-tests-
- name: test
run: |
docker-compose -f docker-compose.ci.yml build ci
docker-compose -f docker-compose.ci.yml run ci setup-tests run-units
- name: cleanup
if: ${{ always() }}
run: |
docker-compose -f docker-compose.ci.yml down --remove-orphans -t 10
sudo chown -R $(whoami):$(id -ng) $CI_CACHE_PATH
features:
name: Features
if: github.repository == 'opf/openproject'
runs-on: [self-hosted-autoscale]
timeout-minutes: 60
env:
CI_CACHE_PATH: "/tmp/cache"
LOCAL_DEV_CHECK: 1
CI_RETRY_COUNT: 3
CAPYBARA_AWS_ACCESS_KEY_ID: "${{ secrets.CAPYBARA_AWS_ACCESS_KEY_ID }}"
CAPYBARA_AWS_SECRET_ACCESS_KEY: "${{ secrets.CAPYBARA_AWS_SECRET_ACCESS_KEY }}"
steps:
- uses: actions/checkout@v2
- name: cache
uses: actions/cache@v2
with:
path: /tmp/cache
key: ${{ runner.os }}-core-tests-features-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-core-tests-features-
${{ runner.os }}-core-tests-
- name: test
run: |
docker-compose -f docker-compose.ci.yml build ci
docker-compose -f docker-compose.ci.yml run ci setup-tests run-features
- name: cleanup
if: ${{ always() }}
run: |
docker-compose -f docker-compose.ci.yml down --remove-orphans -t 10
sudo chown -R $(whoami):$(id -ng) $CI_CACHE_PATH