[tests] cleanup

This commit is contained in:
JAremko 2020-09-06 15:11:59 +03:00 committed by Eugene Yaremenko
parent c9b8bcd73a
commit 59f72709b8
7 changed files with 22 additions and 223 deletions

View File

@ -1,30 +0,0 @@
#!/usr/bin/env bash
## This script ensures that changelog file was updated.
##
## Copyright (c) 2012-2014 Sylvain Benner
## Copyright (c) 2014-2018 Sylvain Benner & Contributors
##
## Author: Eugene Yaremenko
## URL: https://github.com/syl20bnr/spacemacs
##
## This file is not part of GNU Emacs.
##
## License: GPLv3
skip_when_branch_update
if [[ "$CIRCLE_PR_USERNAME" == "${bot_login}" ]]; then
echo "Fun fact. Bots can't climb stairs or update CHANGELOG.develop"
exit 0
fi
fail_when_undefined_pr_number
if grep -q CHANGELOG.develop /tmp/changed_files; then
echo "CHANGELOG.develop was updated as required"
else
echo "Please describe your contribution in CHANGELOG.develop"
echo "if you want it to be mentioned in the release file."
echo "See CONTRIBUTING.org for the details."
exit 1
fi

View File

@ -2,53 +2,6 @@
# Circle CI YAML file
version: 2.0
references:
steps_core_steps: &steps_core_steps
steps:
- checkout
- run:
name: core tests installation
command:
./.circleci/test core installation
- run:
name: core unit tests
command:
./.circleci/test core unit_tests
- run:
name: core functional tests
command:
./.circleci/test core func_tests
spacemacs_base_steps: &spacemacs_base_steps
steps:
- checkout
- run:
name: spacemacs-base distribution tests installation
command:
./.circleci/test layers/+distribution/spacemacs-base installation
- run:
name: spacemacs-base distribution unit tests
command:
./.circleci/test layers/+distribution/spacemacs-base unit_tests
- run:
name: spacemacs-base distribution functional tests
command:
./.circleci/test layers/+distribution/spacemacs-base func_tests
spacemacs_steps: &spacemacs_steps
steps:
- checkout
- run:
name: spacemacs distribution tests installation
command:
./.circleci/test layers/+distribution/spacemacs installation
- run:
name: spacemac distribution unit tests
command:
./.circleci/test layers/+distribution/spacemacs unit_tests
- run:
name: spacemacs distribution functional tests
command:
./.circleci/test layers/+distribution/spacemacs func_tests
jobs:
"Validate PR":
docker:
@ -64,98 +17,7 @@ jobs:
- run:
name: Make sure that this PR doesn't need rebase
command: ./.circleci/PR_rebased
# Emacs 25
"core Emacs25 (required)":
docker:
- image: jare/spacemacs-circleci:emacs25
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *steps_core_steps
"spacemacs-base dist. Emacs25 (required)":
docker:
- image: jare/spacemacs-circleci:emacs25
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *spacemacs_base_steps
"spacemacs dist. Emacs25 (required)":
docker:
- image: jare/spacemacs-circleci:emacs25
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *spacemacs_steps
# Emacs 26
"core Emacs26 (required)":
docker:
- image: jare/spacemacs-circleci:latest
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *steps_core_steps
"spacemacs-base dist. Emacs26 (required)":
docker:
- image: jare/spacemacs-circleci:latest
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *spacemacs_base_steps
"spacemacs dist. Emacs26 (required)":
docker:
- image: jare/spacemacs-circleci:latest
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *spacemacs_steps
# Emacs snapshot
"core Emacs snapshot (optional)":
docker:
- image: jare/spacemacs-circleci:emacs-snapshot
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *steps_core_steps
"spacemacs-base dist. Emacs snapshot (optional)":
docker:
- image: jare/spacemacs-circleci:emacs-snapshot
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *spacemacs_base_steps
"spacemacs dist. Emacs snapshot (optional)":
docker:
- image: jare/spacemacs-circleci:emacs-snapshot
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
<<: *spacemacs_steps
"CHANGELOG.develop updated (optional)":
docker:
- image: jare/spacemacs-circleci:latest
environment:
BASH_ENV: ".circleci/shared"
working_directory: ~/.emacs.d
steps:
- checkout
- run:
name: Select changed files
command: ./.circleci/select
- run:
name: Check CHANGELOG.develop
command: ./.circleci/PR_changelong
"Validate Documentation (required)":
"Validate Documentation":
docker:
- image: jare/spacemacs-circleci:latest
environment:
@ -178,33 +40,4 @@ workflows:
build:
jobs:
- "Validate PR"
# - "core Emacs25 (required)":
# requires:
# - "Validate PR"
# - "spacemacs-base dist. Emacs25 (required)":
# requires:
# - "Validate PR"
# - "core Emacs26 (required)":
# requires:
# - "Validate PR"
# - "spacemacs-base dist. Emacs26 (required)":
# requires:
# - "Validate PR"
# - "spacemacs dist. Emacs25 (required)":
# requires:
# - "Validate PR"
# - "core Emacs snapshot (optional)":
# requires:
# - "Validate PR"
# - "spacemacs-base dist. Emacs snapshot (optional)":
# requires:
# - "Validate PR"
# - "spacemacs dist. Emacs snapshot (optional)":
# requires:
# - "Validate PR"
- "Validate Documentation (required)":
requires:
- "Validate PR"
# - "CHANGELOG.develop updated (optional)":
# requires:
# - "Validate PR"
- "Validate Documentation"

View File

@ -14,23 +14,11 @@
skip_when_branch_update
fail_when_undefined_pr_number
echo "PATCH_URL: \"${pr_patch_URL}\""
files_json=$(curl "${pr_file_list_URL}" --silent)
curl "${pr_patch_URL}" --output /tmp/patch --silent
first_commit=$(echo $(head -n 1 /tmp/patch) | sed -n 's/From \([a-zA-Z0-9]\+\).*/\1/p')
if [[ -z "${first_commit// }" ]]; then
echo "Can't find first commit"
exit 1
else
echo "First commit: ${first_commit}"
fi
git diff --name-only "${first_commit}^" HEAD > /tmp/changed_files
if [ $? -ne 0 ]; then
echo "Git diff failed"
exit 1
fi
for file_name in $(echo "${files_json}" | jq -r '.[].filename'); do
echo "${file_name}" >> /tmp/changed_files
done
echo_headline "CHANGED FILES:"
cat /tmp/changed_files

View File

@ -17,16 +17,24 @@ mst_b="master"
prj_owner="syl20bnr"
prj_repo="spacemacs"
bot_login="emacspace"
upstream_data_URL_root="https://api.github.com/repos/"
api_URL_root="https://api.github.com"
upstream_data_URL_root="${api_URL_root}/"
upstream_data_URL_root+="repos/"
upstream_data_URL_root+="${prj_owner}/"
upstream_data_URL_root+="${prj_repo}"
CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"
pr_data_URL="${upstream_data_URL_root}/pulls/${CIRCLE_PR_NUMBER}"
upstream_data_URL="${upstream_data_URL_root}/branches/develop"
pr_patch_URL="https://patch-diff.githubusercontent.com/raw/"
pr_patch_URL+="${prj_owner}/"
pr_patch_URL+="${prj_repo}/pull/"
pr_patch_URL+="${CIRCLE_PR_NUMBER}.patch"
pr_file_list_URL="${api_URL_root}/"
pr_file_list_URL+="repos/"
pr_file_list_URL+="${prj_owner}/"
pr_file_list_URL+="${prj_repo}/"
pr_file_list_URL+="pulls/"
pr_file_list_URL+="${CIRCLE_PR_NUMBER}/"
pr_file_list_URL+="files"
# Helpers
echo_headline () {

View File

@ -1,5 +1,5 @@
---
# TravisCI YAML file
# TravisCI YAML file for publishing/updating/formatting Spacemacs documentation.
language: generic
sudo: required
services:

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
## Documentation publishing script for Travis CI integration
## HTML documentation publishing script for Travis CI integration
##
## Copyright (c) 2012-2014 Sylvain Benner
## Copyright (c) 2014-2018 Sylvain Benner & Contributors

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
## Documentation publishing script for Travis CI integration
## ORG documentation publishing script for Travis CI integration
##
## Copyright (c) 2012-2014 Sylvain Benner
## Copyright (c) 2014-2018 Sylvain Benner & Contributors