Skip to content

Commit

Permalink
Passage de CircleCI vers GitHub Actions
Browse files Browse the repository at this point in the history
Merge pull request #1663 from openfisca/github-actions
  • Loading branch information
HAEKADI authored Sep 15, 2021
2 parents 03d8591 + 29bb002 commit 9094867
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 225 deletions.
222 changes: 0 additions & 222 deletions .circleci/config.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash

IGNORE_DIFF_ON="README.md CONTRIBUTING.md Makefile .gitignore .circleci/* .github/*"
IGNORE_DIFF_ON="README.md CONTRIBUTING.md Makefile .gitignore .github/*"

last_tagged_commit=`git describe --tags --abbrev=0 --first-parent` # --first-parent ensures we don't follow tags not published in master through an unlikely intermediary merge commit

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash

if [[ $CIRCLE_BRANCH == master ]]
if [[ ${GITHUB_REF#refs/heads/} == master ]]
then
echo "No need for a version check on master."
exit 0
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions .github/split_tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import sys
from glob import glob


def split_tests(number_of_files, CI_NODE_TOTAL, CI_NODE_INDEX, test_files_list):
test_files_sublist = []

for file_index in range(number_of_files):
file_number = file_index % CI_NODE_TOTAL
if file_number == CI_NODE_INDEX:
test_files_sublist.append(test_files_list[file_index])

tests_to_run_string = " ".join(test_files_sublist)

return tests_to_run_string


if __name__ == "__main__":
CI_NODE_TOTAL, CI_NODE_INDEX = int(sys.argv[1]), int(sys.argv[2])
test_files_list = glob("tests/**/*.yaml", recursive=True) + glob("tests/**/*.yml", recursive=True)
number_of_files = len(test_files_list)
sys.stdout.write(split_tests(number_of_files, CI_NODE_TOTAL, CI_NODE_INDEX, test_files_list))
File renamed without changes.
Loading

0 comments on commit 9094867

Please sign in to comment.