1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 17:23:22 +01:00

kick out Travis

This commit is contained in:
Matthias Kretschmann 2019-11-26 02:18:54 +01:00
parent 11604f73b7
commit 9710dc7adb
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 18 additions and 48 deletions

View File

@ -10,7 +10,6 @@ LICENSE
.vscode
public
.cache
.travis.yml
package-lock.json
README.md
coverage

View File

@ -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 }}

View File

@ -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=

View File

@ -8,7 +8,7 @@
<a href="https://matthiaskretschmann.com">matthiaskretschmann.com</a>
</p>
<p align="center">
<a href="https://travis-ci.com/kremalicious/portfolio"><img src="https://travis-ci.com/kremalicious/portfolio.svg?branch=master" /></a>
<a href="https://github.com/kremalicious/portfolio/actions"><img src="https://github.com/kremalicious/portfolio/.github/workflows/ci.yml/badge.svg" /></a>
<a href="https://codeclimate.com/github/kremalicious/portfolio/maintainability"><img src="https://api.codeclimate.com/v1/badges/8f561ec93e0f8c6b15d9/maintainability" /></a>
<a href="https://codeclimate.com/github/kremalicious/portfolio/test_coverage"><img src="https://api.codeclimate.com/v1/badges/8f561ec93e0f8c6b15d9/test_coverage" /></a>
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/kremalicious/portfolio.svg" /></a>
@ -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.