From 4de44a537bc0ef9a8935493e6c7ba9f3942a4908 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Wed, 29 Mar 2023 00:54:19 +0200 Subject: [PATCH] replace travis CI with github actions (check syntax, check links) - travis CI free plans were discontinued - CI pipeline is similar to https://github.com/awesome-selfhosted/awesome-selfhosted-data and uses https://github.com/nodiscc/hecat - the pipeline will not pass until https://github.com/awesome-foss/awesome-sysadmin/issues/416 has been fixed - ref. https://github.com/awesome-foss/awesome-sysadmin/issues/405 --- .github/workflows/ci.yml | 19 +++++++++++++++++++ .hecat/awesome-lint.yml | 8 ++++++++ .hecat/import.yml | 6 ++++++ .hecat/url-check.yml | 11 +++++++++++ .travis.yml | 7 ------- Makefile | 29 +++++++++++++++++++++++++++++ 6 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .hecat/awesome-lint.yml create mode 100644 .hecat/import.yml create mode 100644 .hecat/url-check.yml delete mode 100644 .travis.yml create mode 100644 Makefile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4400a51 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: make import + - run: make awesome_lint + - run: make url_check diff --git a/.hecat/awesome-lint.yml b/.hecat/awesome-lint.yml new file mode 100644 index 0000000..bc2adf5 --- /dev/null +++ b/.hecat/awesome-lint.yml @@ -0,0 +1,8 @@ +steps: + - name: check data against awesome-sysadmin guidelines + module: processors/awesome_lint + module_options: + source_directory: ./ + licenses_files: + - licenses.yml + - licenses-nonfree.yml diff --git a/.hecat/import.yml b/.hecat/import.yml new file mode 100644 index 0000000..502e219 --- /dev/null +++ b/.hecat/import.yml @@ -0,0 +1,6 @@ +steps: + - name: import awesome-sysadmin README.md to YAML + module: importers/markdown_awesome + module_options: + source_file: ./README.md + output_directory: ./ diff --git a/.hecat/url-check.yml b/.hecat/url-check.yml new file mode 100644 index 0000000..7ea063f --- /dev/null +++ b/.hecat/url-check.yml @@ -0,0 +1,11 @@ +steps: + - name: check URLs + module: processors/url_check + module_options: + source_directories: + - software + - tags + source_files: + - licenses.yml + errors_are_fatal: True + exclude_regex: [] \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0601bbe..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: ruby -rvm: - - 2.2 -before_script: - - gem install awesome_bot -script: - - awesome_bot README.md --allow-dupe --allow-redirect --white-list bestpractical.com/rt,mogilefs,harding,archipel,linuxcontainers,spiceworks diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b87fa49 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +SHELL := /bin/bash + +.PHONY: install # install build tools in a virtualenv +install: + python3 -m venv .venv + source .venv/bin/activate && \ + pip3 install wheel && \ + pip3 install --force git+https://github.com/nodiscc/hecat.git@master + +.PHONY: import # import data from original list at https://github.com/awesome-foss/awesome-sysadmin +import: install + rm -rf tags/ software/ platforms/ + mkdir -p tags/ software/ platforms/ + source .venv/bin/activate && \ + hecat --config .hecat/import.yml + +.PHONY: awesome_lint # check data against awesome-sysadmin guidelines +awesome_lint: install + source .venv/bin/activate && \ + hecat --config .hecat/awesome-lint.yml + +.PHONY: url_check # check URLs for dead links or other connection problems +url_check: install + source .venv/bin/activate && \ + hecat --config .hecat/url-check.yml + +.PHONY: help # generate list of targets with descriptions +help: + @grep '^.PHONY: .* #' Makefile | sed 's/\.PHONY: \(.*\) # \(.*\)/\1 \2/' | expand -t20