-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: travis: Remove travis config add github action workflow
- Loading branch information
Showing
2 changed files
with
50 additions
and
36 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,50 @@ | ||
name: Pygame Web Test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres:9.6 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: pygame_test | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.6 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install -y yui-compressor node optipng | ||
pip install --upgrade pip | ||
pip install -r requirements.dev.txt | ||
pip install --upgrade pytest | ||
pip install coveralls | ||
pip install -e . | ||
- name: Create database | ||
run: | | ||
cp example.env .env | ||
psql -c 'create database pygame_test;' -U postgres | ||
psql pygame_test -c "CREATE USER pygame_test WITH PASSWORD 'password';" -U postgres | ||
psql pygame_test -c "GRANT ALL PRIVILEGES ON DATABASE pygame_test to pygame_test;" -U postgres | ||
- name: Run tests | ||
env: | ||
APP_SECRET_KEY: a | ||
run: pytest | ||
- name: Upload coverage report | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.