-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from travis to github actions
- Loading branch information
Showing
6 changed files
with
103 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
|
||
jobs: | ||
build: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup node 14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
cache: npm | ||
- name: Node checks | ||
run: | | ||
npm ci | ||
npm test | ||
npm run lint | ||
- name: Install browsers | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
TZ: Etc/UTC | ||
run: | | ||
sudo apt-get update -q -y | ||
sudo apt-get install -q -y chromium-chromedriver firefoxdriver | ||
- name: Run browser tests | ||
run: npm run browser-test | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: ["Tests"] | ||
branches: [main] | ||
types: [completed] | ||
|
||
|
||
jobs: | ||
staging-deploy: | ||
name: Deploy to beta.bios-pw.org | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} || ${{ github.event.workflow_dispatch.sender.site_admin == true }} | ||
runs-on: ubuntu-latest | ||
concurrency: beta | ||
environment: | ||
name: beta | ||
url: https://beta.bios-pw.org/ | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
cache-dependency-path: ./ci/requirements.txt | ||
|
||
- name: Install boto3 | ||
run: pip install -r ./ci/requirements.txt | ||
|
||
- name: Setup node 14 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
cache: npm | ||
|
||
- name: Build scripts and assets | ||
run: | | ||
npm ci | ||
npm run build-stage | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@13d241b293754004c80624b5567555c4a39ffbe3 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||
|
||
- name: Upload assets to S3 | ||
run: ./ci/deploy.py ./dist/ beta.bios-pw.org |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
boto3==1.20.52 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters