From 48b25ca96f801f018e4829b00a6375c2624a85ee Mon Sep 17 00:00:00 2001 From: vimux Date: Tue, 5 Jan 2021 12:54:20 -0500 Subject: [PATCH] CI: Replace Travis CI with GitHub Actions --- .github/workflows/ci-test.yml | 58 +++++++++++++++++++++++++++++++++++ .travis.yml | 11 ------- 2 files changed, 58 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/ci-test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml new file mode 100644 index 0000000..0580f4f --- /dev/null +++ b/.github/workflows/ci-test.yml @@ -0,0 +1,58 @@ +name: Test + +on: + push: + branches: + - master + paths-ignore: + - "README.md" + pull_request: + paths-ignore: + - "README.md" + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + node: + - '10.x' + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + + - name: Install npm dependencies + run: npm ci + + - name: Lint + run: npm run lint + + test-hugo: + runs-on: ubuntu-latest + strategy: + matrix: + hugo: + - '0.54.0' # min version + - '0.58.2' # https://github.com/gohugoio/hugoThemes/issues/682 + - '0.59.1' # last major version without goldmark renderer + - '0.60.1' # first major version with goldmark renderer + - '0.76.5' # https://github.com/gohugoio/hugo/issues/7822 + - 'latest' + fail-fast: true + + steps: + - uses: actions/checkout@v2 + + # https://github.com/peaceiris/actions-hugo (community action) + - name: Run Hugo ${{ matrix.hugo }} + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: ${{ matrix.hugo }} + # extended: true + + - name: Build with Hugo ${{ matrix.hugo }} + working-directory: exampleSite + run: HUGO_THEME="Binario" hugo --themesDir ../.. --i18n-warnings -v diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ff2ecc9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -node_js: - - "10" - -sudo: false -script: - - npm run lint - -branches: - only: - - master