From 9710dc7adb3ecab59c1a324ea92b0de0f7ccdc01 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 26 Nov 2019 02:18:54 +0100 Subject: [PATCH] kick out Travis --- .dockerignore | 1 - .github/workflows/ci.yml | 17 ++++++++++++++--- .travis.yml | 40 ---------------------------------------- README.md | 8 ++++---- 4 files changed, 18 insertions(+), 48 deletions(-) delete mode 100644 .travis.yml diff --git a/.dockerignore b/.dockerignore index 7b49a06..ae12b32 100644 --- a/.dockerignore +++ b/.dockerignore @@ -10,7 +10,6 @@ LICENSE .vscode public .cache -.travis.yml package-lock.json README.md coverage diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e222c52..7d662b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,13 @@ jobs: restore-keys: ${{ runner.os }}-node- - run: npm ci - - run: npm test + + - name: Run tests & publish code coverage + uses: paambaati/codeclimate-action@v2.3.0 + with: + coverageCommand: npm test + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} build: runs-on: ubuntu-latest @@ -54,13 +60,14 @@ jobs: GATSBY_GITHUB_TOKEN: ${{ secrets.GATSBY_GITHUB_TOKEN }} - uses: actions/upload-artifact@v1 + if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' with: name: public path: public deploy: needs: build - if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' + if: success() && (github.event_name == 'pull_request' || github.ref == 'refs/heads/master') runs-on: ubuntu-latest steps: @@ -68,4 +75,8 @@ jobs: - uses: actions/download-artifact@v1 with: name: public - - run: ./scripts/deploy.sh + - name: Deploy to S3 + run: ./scripts/deploy.sh + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 393b77b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -dist: xenial -language: node_js -node_js: - - '12' - -cache: - npm: true - directories: - - public - -before_install: - - sudo apt-get -qq update - - sudo apt-get install python3-pip - - sudo -H pip3 install --upgrade pip - -before_script: - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - './cc-test-reporter before-build' - -script: - - npm test - - './cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT' - - npm run build - -after_success: - - pip install --user awscli - - export PATH=$PATH:$HOME/.local/bin - - npm run deploy - - npm run lh -- https://beta.matthiaskretschmann.com - -notifications: - email: false - slack: - template: - - '%{branch} *%{result}* build (<%{build_url}|#%{build_number}>) for <%{compare_url}|%{commit}>' - - 'Execution time: *%{duration}*' - - 'Message: %{message}' - rooms: - - secure: r6kVJw3zS4raTXgeBEYZYO/5YawnLoi1vO4zG3obhcNFRLm9FxlzuXfulFhjQA4viPQUW07m5UGud4bPTrDIAE35GUcLRlyisH/odahgsrmqLrBvz9CB+/V5WrEsCGpE9G3I/y5JGSRavjs+5qfVqJZaAI9Ox7bCcw+Msa5r/p7/yJw5di4EzgNLFWQswyio0zeOdjtCYgqpngWtLGpn0ksSwqNyqp/kntoHSz4nDdO/6GWS1q5K9mOfGMXr/wwiYuQrgDPpygRWETy9F8qh9yH2cseJmCZaXvSTSU1L9yV01qrBP5zDTTM2jPUGMQKY4JBoxFtU29G1BLWGAgMW9ymKe9V+f8FgbirZ+O1Vp87QAZPJXx5kO+pgqBtGewoYfp0k9HJ5xQAhr83l82w8BAEHVS3G/Y7cKKK9QNH9Z6gpdx6Y3s9YkpGqkv79MRvZo0tJV+XTOldCCfUFVxXXuZofuswWGUgt2h9qNoFY+AZc0G1TV/XVDHbDm32JNiGkuk+uO83HT9VI7G5PRWNcD8kP7ZS6XThiU2qOGr4OPGggmpFpJ7Yqc3LNFOjhFunKSzGOrZrc0GLZAbAR7qHkWNpiqQQ/RSpfnXfbPlAIJY6w5Vuzh9KhIIPkbWdP89Bc2Kw+W+ACFjStO7s298/8dty44EvJ2TS9CCjOhYtgaxk= diff --git a/README.md b/README.md index 9d1219a..cfc66ea 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ matthiaskretschmann.com

- + @@ -220,7 +220,7 @@ SLUG-03.png ## 🚚 Deployment -Automatic deployments are triggered upon successful tests & builds on Travis: +Automatic deployments are triggered upon successful tests & builds via GitHub Actions: - push to `master` initiates a live deployment - any Pull Request, and subsequent pushes to it, initiates a beta deployment @@ -231,7 +231,7 @@ The deploy command simply calls the [`scripts/deploy.sh`](scripts/deploy.sh) scr npm run deploy ``` -Upon live deployment, deploy script also purges the Cloudflare cache, and pings search engines. Travis requires the following environment variables to be setup for successful deployments: +Upon live deployment, deploy script also purges the Cloudflare cache, and pings search engines. GitHub requires the following environment variables to be setup for successful deployments in the repository secrets: - `AWS_ACCESS_KEY_ID` - `AWS_SECRET_ACCESS_KEY` @@ -242,7 +242,7 @@ Upon live deployment, deploy script also purges the Cloudflare cache, and pings ## 🏛 Licenses -**© Copyright 2018 Matthias Kretschmann** +**© Copyright 2019 Matthias Kretschmann** All images and projects are plain ol' copyright, most displayed projects are subject to the copyright of their respective owners.