All Specs #66
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: All Specs | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
paths-ignore: | |
- 'docs/**' | |
push: | |
branches: | |
- dev | |
- release/* | |
paths-ignore: | |
- 'docs/**' | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
all: | |
name: Run Tests | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_BUILDKIT: 1 | |
CI_RETRY_COUNT: 3 | |
steps: | |
- name: Checkout Core | |
uses: actions/checkout@v4 | |
with: | |
repository: opf/openproject | |
ref: stable/14 | |
- name: Checkout Project | |
uses: actions/checkout@v4 | |
with: | |
path: modules/openproject-open_desk | |
# Copy the files needed to setup the project for tests | |
- name: Setup plugin | |
run: | | |
cp modules/openproject-open_desk/docker/ci/Dockerfile docker/ci/Dockerfile | |
cp modules/openproject-open_desk/docker/ci/db_entrypoint.sh docker/ci/entrypoint.sh | |
cp modules/openproject-open_desk/docker/ci/Gemfile.plugins ./Gemfile.plugins | |
- name: Cache Built Image | |
id: cache_docker | |
uses: runs-on/cache@v4 | |
with: | |
path: cache/docker | |
key: "${{ runner.os }}-docker-ci-${{ hashFiles('docker-compose.ci.yml', 'docker/ci/*', '.ruby-version', 'bin/ci') }}" | |
- name: Restore Image from cache | |
if: steps.cache_docker.outputs.cache-hit == 'true' | |
run: docker load -i cache/docker/image.tar | |
- name: Cache GEM | |
uses: actions/cache@v4 | |
with: | |
path: cache/bundle | |
key: gem-bookworm-${{ hashFiles('.ruby-version') }}-${{ hashFiles('Gemfile.lock') }} | |
restore-keys: | | |
gem-bookworm-${{ hashFiles('.ruby-version') }}- | |
- name: Cache Node Modules | |
uses: actions/cache@v4 | |
with: | |
path: cache/node | |
key: node-${{ hashFiles('package.json', 'frontend/package-lock.json') }} | |
restore-keys: | | |
node- | |
- name: Build Setup Test Environment | |
run: bin/ci setup-tests | |
- name: Non Feature Specs | |
run: bin/ci run-units | |
- name: Feature Specs | |
run: bin/ci run-features | |
- name: Save CI Image to cache | |
if: steps.cache_docker.outputs.cache-hit != 'true' | |
run: mkdir -p cache/docker && docker save openproject/ci:v1 -o cache/docker/image.tar |