Skip to content

Commit

Permalink
Drop automerge (#194)
Browse files Browse the repository at this point in the history
- Remove automerge because it is adding more complexity than it is solving for.
- Simplify PR tests into one file.
  • Loading branch information
lucaskjaero authored Dec 19, 2020
1 parent b1e0627 commit f2702b9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 27 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Daily uptime check
on:
schedule:
- cron: '0 9 * * *'
push:
branches: [master]
pull_request:
branches: [master]

jobs:
verify-site-is-up:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ name: "Security scan"
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 7 * * 4'

jobs:
analyze:
name: Analyze
security:
name: Security Scan
runs-on: ubuntu-latest

strategy:
Expand Down
54 changes: 35 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
name: lucas-kjaero-zhang-resume-chinese.pdf
path: resume/lucas-kjaero-zhang-个人简历.pdf

test-frontend:
test:
name: "Lint and test frontend"
runs-on: ubuntu-latest
steps:
Expand All @@ -76,11 +76,42 @@ jobs:
run: npm test
- name: Lint
run: npm run lint

links:
name: "Check links"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/[email protected]
with:
python-version: 3.7
- name: Install dependencies
run: pip install -r requirements.txt
- name: Check links
run: python link_checker.py

security:
name: Security Scan
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: ['javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

deploy:
name: Deploy to dev environment
if: ${{ github.event.label.name != 'automerge' }}
needs: [build-resume, build-frontend]
needs: [build-resume, build-frontend, security]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@master
Expand All @@ -107,19 +138,4 @@ jobs:
- name: Push to S3
run: aws s3 sync public s3://${{ secrets.AWS_DEV_S3_BUCKET }}/ --no-progress --delete
- name: Echo dev address
run: echo "http://lucas-kjaero-zhang-website-dev.s3-website-us-west-1.amazonaws.com"

automerge:
name: Automatically merge
runs-on: ubuntu-latest
needs: [add-label, build-resume, build-frontend, test-frontend]
steps:
- name: automerge
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_METHOD: squash
MERGE_COMMIT_MESSAGE: pull-request-title-and-description
MERGE_FORKS: false
MERGE_DELETE_BRANCH: true
UPDATE_METHOD: rebase
run: echo "http://lucas-kjaero-zhang-website-dev.s3-website-us-west-1.amazonaws.com"

0 comments on commit f2702b9

Please sign in to comment.